Skip to content

Commit 7f49d09

Browse files
jrentlezdribic
authored andcommitted
fix: arguments for the vim.lsp.Client.supports_method method (nvim-lua#1356)
Signed-off-by: Dejan Ribič <[email protected]>
1 parent 4ca8da8 commit 7f49d09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ require('lazy').setup({
567567
--
568568
-- When you move your cursor, the highlights will be cleared (the second autocommand).
569569
local client = vim.lsp.get_client_by_id(event.data.client_id)
570-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
570+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
571571
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
572572
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
573573
buffer = event.buf,
@@ -594,7 +594,7 @@ require('lazy').setup({
594594
-- code, if the language server you are using supports them
595595
--
596596
-- This may be unwanted, since they displace some of your code
597-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
597+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
598598
map('<leader>th', function()
599599
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
600600
end, '[T]oggle Inlay [H]ints')

0 commit comments

Comments
 (0)