❌

Normale weergave

nightly: lsp: Honor dynamic LSP document selectors (#59243)

Door: aviatesk
2 September 2026 om 21:54

Zed previously discarded the documentSelector from dynamically
registered textDocument capabilities and treated those capabilities as
applicable to every buffer attached to the server. This could route
requests for documents outside a registration selector.

Track dynamic textDocument registrations by method and registration ID,
and use their selectors when routing local requests, checking
capabilities, and deriving completion triggers. Static capabilities
continue to apply to every attached buffer. Language and URI scheme
matching are supported, while unsupported pattern matching remains
fail-open.

Keep document color, symbol, link, code lens, and folding range caches
aligned with the selector-aware server set so incapable or non-matching
servers do not leave caches perpetually incomplete.

Require an advertised diagnostic provider before sending pull diagnostic
requests, and add integration coverage for selector-aware dynamic
completion registration and trigger updates.


Release Notes:

  • Improved language server request routing to respect dynamically
    registered document selectors.

Co-authored-by: Kirill Bulatov kirill@zed.dev

  •  
❌