Would it be possible to use project natures? #384
Replies: 2 comments 1 reply
-
So basically a |
Beta Was this translation helpful? Give feedback.
-
I would rather appreciate such a solution since in our project there is a requirement that it should be possible to define a LS per project.
Same issue here. I would't start all language servers by default for performance reasons. |
Beta Was this translation helpful? Give feedback.
-
I discovered when coming up with my proposed API that the way we get the language server for a project is a little unsatisfactory. The implementation is really based around file [content] types, and while we can figure out that no appropriate language server is running and launch one when a file for a given type is opened, we don't do that for projects.
I think this might be a weakness of the LSP itself - it doesn't really have a concept of a project type. When we try and find a LS for a project the best we can do is scan the LS that have started so far [restarting them if necessary] to see if any are associated with a project.
That means if you start eclipse with a project open but no open editors, then Find Workspace Symbols
ctrl-shift-T
won't work, but will start working as soon as you open a file in that project of a content type associated with a LS.Would it be possible/useful to add an optional parameter to our Language Server Definition extension point that took a project nature? Project-level LS operations on that project could then key off the project nature, even if the LS hadn't started.
What do people think? Maybe it's not worth the trouble since there aren't many project-level (rather than document-level) operations, and having no open documents (and none ever opened) is a bit of an artificial edge-case.
Beta Was this translation helpful? Give feedback.
All reactions