refactor(lsp): use supports_method where applicable

This commit is contained in:
Ilia Choly
2024-05-19 13:03:06 -04:00
committed by Lewis Russell
parent 10601ac5fa
commit 339129ebc9
2 changed files with 10 additions and 6 deletions

View File

@ -905,7 +905,7 @@ end
--- @param bufnr integer Number of the buffer, or 0 for current
function Client:_text_document_did_open_handler(bufnr)
changetracking.init(self, bufnr)
if not vim.tbl_get(self.server_capabilities, 'textDocumentSync', 'openClose') then
if not self.supports_method(ms.textDocument_didOpen) then
return
end
if not api.nvim_buf_is_loaded(bufnr) then