Skip to content

Commit bf52373

Browse files
jrentlezandreacanton
authored andcommitted
fix: arguments for the vim.lsp.Client.supports_method method (nvim-lua#1356)
1 parent bf8eee8 commit bf52373

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

0 commit comments

Comments
 (0)