-
Notifications
You must be signed in to change notification settings - Fork 183
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
feat: add GlobalLspListener #2523
base: main
Are you sure you want to change the base?
Conversation
* origin/main: Use orjson to de-/serialize json-rpc messages (#2513)
* fix/remove-generators: Use orjson to de-/serialize json-rpc messages (#2513) remove unnecessary use of generators for session retrieval
* origin/main: feat: make DebouncerNonThreadSafe public (#2525)
* main: style change Don't restart servers when userprefs change (#2448)
I think I'm not a big fan of exposing Lines 175 to 184 in d71e11a
Alternatively I would define two new public functions But in general, if the use case is only the interaction between LSP-volar and LSP-typescript, shouldn't this whole logic better be handled in LSP-volar? The |
In this case LSP-volar needs to know when LSP-typescript initializes or shuts down. I'm still thinking about this and experimenting with different approaches though. |
I've been thinking a bit on how to support support sublimelsp/LSP-volar#221
My latest idea is to not do any magic to make LSP-typescript initialize for Vue files and instead when LSP-volar is initialized on a vue file, and LSP-typescript is not running, add a Phantom at the top of the file that tells the user to initialize LSP-typescript to get the full experience. Clicking on the phantom triggers a window command that modifies project settings that enables LSP-typescript for Vue files and also enables the vue plugin by referencing it from the LSP-volar storage path. Would look something like:
To implement that idea I need some global listener that will tell me whenever a session initializes or shuts down on a view thus this API. It would be used like this:
Let me know if you have any better idea on how this could be handled.