Skip to content

Commit 876653f

Browse files
jrentlezarkottke
authored andcommitted
fix: arguments for the vim.lsp.Client.supports_method method (nvim-lua#1356)
1 parent 176be25 commit 876653f

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

0 commit comments

Comments
 (0)