-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find project file #8
Comments
I've implemented something that works at the moment, but it has a stub where Nimble support would be. If anyone could figure out how to get the project file from a .nimble file it would be nice to add. |
I think we can use initialise params's for workspace feature, we take each workspaceFolder as project root, the compiler/options.nim has we can use it pass to initNimsuggest it's all during initialize period . https://github.com/microsoft/vscode/wiki/Adopting-Multi-Root-Workspace-APIs#language-client--language-server |
I think there was some problem with using |
when I check the debug info it shows |
for the nimble things , I think nimble need export some proc ,we can import it use its api, I remember there's proc doing this work, but it is private proc. |
It should only initialise the project for new project files. So in your case it isn't able to get the project properly. As long as all files in the same project return the same project file from https://github.com/PMunch/nimlsp/blob/master/src/nimlsp.nim#L128. The Nimble part is a bit trickier since nimble files are NimScript and need to be evaluated in order to get the value. However this already imports the entire compiler, so at least it won't add much of a dependency. |
As this issue points out
nimsuggest
needs a project file to work. Currently this just treats every file as it's own project file, but an actual algorithm should be implemented for this task. Internally it would replace thenimsuggest
field in theopenFiles
table with a project field that can be shared across files. If anyone could make a procedure that takes a file as an argument and returns the best match project file (or just returns the file itself if no project file is found), that would help a lot.The text was updated successfully, but these errors were encountered: