Skip to content

Commit

Permalink
fix: check server capabilities (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlubas authored Oct 8, 2024
1 parent ecb3510 commit 8d2615d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/blink/cmp/accept/brackets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ function brackets.add_brackets_via_semantic_token(filetype, item, callback)
if client == nil then return callback() end

local start_time = vim.uv.hrtime()
if not (client.server_capabilities.semanticTokensProvider and client.server_capabilities.semanticTokensProvider.legend) then
return callback()
end
local numToTokenType = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
local params = {
textDocument = vim.lsp.util.make_text_document_params(),
Expand Down

0 comments on commit 8d2615d

Please sign in to comment.