fix(lsp): filetype matching to documentSelector in dynamic capabilities (#25425)

Use the get_language_id client option to resolve the filetype when
matching the document selector in a dynamic capability.


Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
This commit is contained in:
Michal Liszcz
2023-12-22 15:03:13 +01:00
committed by GitHub
parent 2151e781e4
commit 031088fc0a
3 changed files with 30 additions and 9 deletions

View File

@@ -1073,7 +1073,7 @@ function lsp.start_client(config)
end
--- @param method string
--- @param opts? {bufnr?: number}
--- @param opts? {bufnr: integer?}
client.supports_method = function(method, opts)
opts = opts or {}
local required_capability = lsp._request_name_to_capability[method]