feat(lsp): per-server features and code-action-kinds filter (#1099)

A [[language-servers]] entry (or languageServers.<name> in settings) can list features and code-action-kinds: capabilities outside features are dropped after initialize and from later registrations, publishDiagnostics and Inspect Code only use servers with diagnostics, and code actions are narrowed to the kept kinds (advertised kinds and answers both). No built-in definition uses them yet. First stage of #901: lets a refactoring-only server sit next to the language's own one.

Co-authored-by: andreabasile <[email protected]>
Цей коміт міститься в:
Andrea Basileтаandreabasile authored and GitHub committed 2026-11-04 06:43:31 +08:00
1 джерело 63dd83c129
коміт 4d224f80c9
11 files changed
+414 -5

No files matched your search

+20
Переглянути файл
@@ -4319,6 +4319,16 @@ export type LanguageServerSettings_Deserialize = {
languages?: string[],
/** Files marking a workspace root for a server defined here (`pyproject.toml`). */
rootMarkers?: string[],
/**
* Replaces the definition's `features`: what the server is used for
* (`code-action`, `hover`, …); an empty list means everything.
*/
features?: string[] | null,
/**
* Replaces the definition's `code-action-kinds` (`refactor`); an empty
* list keeps every kind.
*/
codeActionKinds?: string[] | null,
};
export type LanguageServerSettings_Serialize = {
@@ -4347,6 +4357,16 @@ export type LanguageServerSettings_Serialize = {
languages: string[],
/** Files marking a workspace root for a server defined here (`pyproject.toml`). */
rootMarkers: string[],
/**
* Replaces the definition's `features`: what the server is used for
* (`code-action`, `hover`, …); an empty list means everything.
*/
features?: string[] | null,
/**
* Replaces the definition's `code-action-kinds` (`refactor`); an empty
* list keeps every kind.
*/
codeActionKinds?: string[] | null,
};
export type LanguagesSettings = {