-
Notifications
You must be signed in to change notification settings - Fork 138
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
Support for Wrokspace Folders + embedded projects #178
base: main
Are you sure you want to change the base?
Conversation
Some LSP clients can have more than one workspace folder, which can be added via [`workspace/didChangeWorkspaceFolders`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_didChangeWorkspaceFolders). This is especially useful for resource-hungry clients, like rust-analyzer or haskell-language-server, in order to avoid spawning multiple clients. Using `lsp.Client.config.root_dir` as the source of truth results in this plugin detecting the wrong project root in this scenario. This PR fixes that, by first searching through the `lsp.Client.workspace_folder`s, and then falling back to the `config.root_dir` if no matching workspace folder is found.
…mbedded in another + unit tests
describe('M._get_buf_root()):', function() | ||
it("testing M._get_buf_root() returns correct buf_root for embedded projects", function() | ||
local outter_project = "/Users/kkrime/outter_project" | ||
local inner_project = "/Users/kkrime/outter_project/inner_project" |
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.
unsure if it really matters, but it seems some more universal paths like /tmp/outer_project
could work better
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.
It really doesn't make any difference, you can change it you feel strongly about it, no problem with me
72c6c5b
to
c11869a
Compare
c11869a
to
a6a0763
Compare
No description provided.