Skip to content

Commit 1970649

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

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

0 commit comments

Comments
 (0)