Skip to content

Commit 8d2615d

Browse files
authored
fix: check server capabilities (#5)
1 parent ecb3510 commit 8d2615d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/blink/cmp/accept/brackets.lua

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ function brackets.add_brackets_via_semantic_token(filetype, item, callback)
107107
if client == nil then return callback() end
108108

109109
local start_time = vim.uv.hrtime()
110+
if not (client.server_capabilities.semanticTokensProvider and client.server_capabilities.semanticTokensProvider.legend) then
111+
return callback()
112+
end
110113
local numToTokenType = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
111114
local params = {
112115
textDocument = vim.lsp.util.make_text_document_params(),

0 commit comments

Comments
 (0)