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
files outside of root directory ? #2986
Comments
Are you looking for "single file support"? nvim-lspconfig/doc/lspconfig.txt Line 430 in 8917d2c
see also: |
Single files means a new language server gets started for each file which is in case of PSALM huge overhead because parsing and analyzing all the files (60K LOC) takes like 15 seconds. So while it actually got activated the issue is configuration because the >>library<< doesn't know the project using it. I could work around by adding a psalm.xml config file and choosing one of the many. But doesn't feel like a true fix. Actually using git submodule or such would be good enough for development. But having to checkout code 40 times cause there are 40+ projects using it feels more hackish. |
I'm not sure if this is the same issue I have, but it sounds like it. It would be great to be able to define, in the LSP setup, directories outside of the project root. This would be useful when writing tests (e.g. PHPUnit) or other files written with an API whose source code you don't have installed in your project root. |
Language server
psalm and files outside of root_dir
Requested feature
Psalm allows to set directories in psaml.xml with
Now if you open PHP files you don't get errors because it's outside of the root directory.
So what I suggest is that a LSP language server can somehow overwrite what files it wants to attach to ?
Eg a psalm implementation could actually read the src attributes.
So finding out about what language server supports a file it would be like: If there is any up and running ask it if it serves the file, otherwise find new root and start a second one.
There are multi directory workspaces proposals maybe more I didn't look into.
Maybe there is a simple solution I missed.
I tried symlinking the directory and that failed cause LSP follows the real path before finding root.
Other clients which have this feature
No response
The text was updated successfully, but these errors were encountered: