-
Notifications
You must be signed in to change notification settings - Fork 106
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
Add support for opening single files #195
Conversation
make it possible to start default client for single file
…itled file this leads to broken behavior of 2 servers running with the same rootUri
When starting a default client even if we do not pass a workspace folder to client options vs code will fall back to first workspace folder if any is open. This means that we cannot use default client for that case as it will result in 2 servers started for the same rootUri. We need to pass a permissive document filter that will match untitled files to the first workspace client. Otherwise language server features won't work for such files. We cannot pass them to all clients as in that case in multiworkspace cases all servers would be handling the same messages. On the other hand if no folder is open we have to use default client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall thrust of changes looks good, I just have some clarification and cleaning-related comments.
@axelson I think I addressed all of the comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks! ❤️
It seems there was some support at some point but it got broken (probably when workspace folders concept was introduced). This PR brings it back and fixes some issues and inconsistencies around untitled files.
Addresses elixir-lsp/elixir-ls#307, depends on elixir-lsp/elixir-ls#562