Skip to content

Commit eb8532b

Browse files
jrentlezzenvignesh
authored andcommitted
fix: arguments for the vim.lsp.Client.supports_method method (nvim-lua#1356)
1 parent 2ec75df commit eb8532b

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
@@ -576,7 +576,7 @@ require('lazy').setup({
576576
--
577577
-- When you move your cursor, the highlights will be cleared (the second autocommand).
578578
local client = vim.lsp.get_client_by_id(event.data.client_id)
579-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
579+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
580580
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
581581
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
582582
buffer = event.buf,
@@ -603,7 +603,7 @@ require('lazy').setup({
603603
-- code, if the language server you are using supports them
604604
--
605605
-- This may be unwanted, since they displace some of your code
606-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
606+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
607607
map('<leader>th', function()
608608
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
609609
end, '[T]oggle Inlay [H]ints')

0 commit comments

Comments
 (0)