Better support for non-primary LSP extensions #27430
Closed
notpeter
started this conversation in
Extensions and Themes
Replies: 1 comment
-
I found some additional context:
And think this should potentially addressed as part of: Or other improvements which remove the primary/secondary LSP concept entirely in zed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context:
Currently when there are multiple language servers available for a given language, there is no way for an Extension to specify which language server should be the primary language server (first in the
language_servers
array) for a given language.Proposal: Add an additional key to extensions.toml to optional designate their Extension provided LSPs as non-primary (E.g.
primary = false
; with a default of true)Which will make it so that the default
"language_servers": ["..."]
for the "LaTeX" language, if a user had the Latex, Cspell and Typos extensions (assuming the last two haveprimary = false
) would expand to ["texlab", "cspell", "typos"] which is I believe the behavior users would want. There have been similar uses with users of theruff
LSP which only provides linting/formatting but not Goto Definition, etc.Reasoning: Currently this requires shipping Zed global default.json entries so that these extensions function properly out of the box.
zed/assets/settings/default.json
Lines 1171 to 1172 in e273de5
zed/assets/settings/default.json
Lines 1210 to 1215 in e273de5
zed/assets/settings/default.json
Lines 1229 to 1231 in e273de5
zed/assets/settings/default.json
Lines 1279 to 1281 in e273de5
Discussion:
There has been previous discussion about potential conflicts between two extensions, for example the R extension provides a tree-sitter with syntax highlighting for R and support for the
languageserver
R LSP; but there are other folks who want to provide the alternateair
LSP which may require cooperation between extensions to be fully supported.Alternate implementations:
language_servers
key for that language.Edit: Perhaps this will all be negated depending on how this is handled:
Beta Was this translation helpful? Give feedback.
All reactions