You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forgive me if there is already a mechanism to do this.
The problem
I have multiple Typescript applications I work on. One of which uses Node and the other uses Deno, using typescript-language-server and deno-lsp respectively. Neither language server works with the other application type, though both projects use filetype: typescript.
Currently I can get around this by using both language servers (config below). This gives me language support, completion, etc, however it also means that I always get erroneous error diagnostics from the wrong server. E.g. In a deno project typescript-language-server will complain that my imports cannot be resolved but in a node application instead deno-lsp will complain about the imports.
Currently (I believe) filetype is the only mechanism used to determine which language server(s) is selected. However we also have roots to define the project root. If it doesn't present a technical challenge or a specification divergence, I believe it would be possible to select the language server based first on filetype, then, if multiple servers are selected use only those which have at least one root resolved. If no roots are supplied, the server is considered to match. As to not break the current config API, it be better to specify a require_root_match field, which would cause the server selection to behave as described.
I'm very open to alternative mechanisms, so long as there would be a way for me to infer (or specify somehow) which language server to use when multiple are matched.
The text was updated successfully, but these errors were encountered:
duplicate of #537 which links to an approach to change the lsp_cmd option per project to include different --config file arguments
I appreciate this isn't super convenient. I think in general we should try to move away from the toml and allow setting everything via Kakoune options, then we solve this for free.
Forgive me if there is already a mechanism to do this.
The problem
I have multiple Typescript applications I work on. One of which uses Node and the other uses Deno, using
typescript-language-server
anddeno-lsp
respectively. Neither language server works with the other application type, though both projects usefiletype: typescript
.Currently I can get around this by using both language servers (config below). This gives me language support, completion, etc, however it also means that I always get erroneous error diagnostics from the wrong server. E.g. In a deno project
typescript-language-server
will complain that my imports cannot be resolved but in a node application insteaddeno-lsp
will complain about the imports.Current config:
Proposed Solution
Currently (I believe)
filetype
is the only mechanism used to determine which language server(s) is selected. However we also haveroots
to define the project root. If it doesn't present a technical challenge or a specification divergence, I believe it would be possible to select the language server based first onfiletype
, then, if multiple servers are selected use only those which have at least oneroot
resolved. If noroots
are supplied, the server is considered to match. As to not break the current config API, it be better to specify arequire_root_match
field, which would cause the server selection to behave as described.I'm very open to alternative mechanisms, so long as there would be a way for me to infer (or specify somehow) which language server to use when multiple are matched.
The text was updated successfully, but these errors were encountered: