zobo / php-language-server

PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

diagnostics work only for files inside `rootPath`

veksha opened this issue · comments

How well files outside of workspace are supported in php-ls?
Is this a server problem or the client should append to workspaceFolders for every file opened outside of rootPath?

Please help. Thanks.

If I understand correctly, you are asking if the language server processes files that are open from outside of work folder? Or are you asking about files outside of work folder, but referenced from composer.json ?

Not referenced anywhere. random .php file that is not located in the current work folder (not indexed) but opened in the editor tab. Diagnostics are not working for such files. Language server can show some mistake in this file only on start. but if I will fix the mistake diagnosics will not come again, and old diagnostic messages will stay forever.
it works correctly for files inside work dir.

for example pylsp for python can work with such files, and even jump to definition between files not only inside current directory, but even on level above. and autocompletions work from all nearby directories. I dont have to set up correct workspace directory. it just picks up all stuff correctly. don't know if it is easy for php as for python to do that.