From ff792f8e690854aaae9be627c583b596faf137c0 Mon Sep 17 00:00:00 2001 From: Jeff Martin Date: Tue, 18 Nov 2025 23:03:40 -0800 Subject: fix(lsp): enable insertReplaceSupport for use in adjust_start_col #36569 Problem: With the typescript LSes typescript-language-server and vtsls, omnicompletion on partial tokens for certain types, such as array methods, and functions that are attached as attributes to other functions, either results in no entries populated in the completion menu (typescript-language-server), or an unfiltered completion menu with all array methods included, even if they don't share the same prefix as the partial token being completed (vtsls). Solution: Enable insertReplaceSupport and uses the insert portion of the lsp completion response in adjust_start_col if it's included in the response. Completion results are still filtered client side. --- runtime/lua/vim/lsp/protocol.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/lua/vim/lsp/protocol.lua') diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua index 509c203ef7..f367c0a7c3 100644 --- a/runtime/lua/vim/lsp/protocol.lua +++ b/runtime/lua/vim/lsp/protocol.lua @@ -478,6 +478,7 @@ function protocol.make_client_capabilities() preselectSupport = false, deprecatedSupport = true, documentationFormat = { constants.MarkupKind.Markdown, constants.MarkupKind.PlainText }, + insertReplaceSupport = true, resolveSupport = { properties = { 'additionalTextEdits', -- cgit