Skip to content

Commit b122f0d

Browse files
jrentlezNickalas Cason
authored andcommitted
fix: arguments for the vim.lsp.Client.supports_method method (nvim-lua#1356)
1 parent e07cda6 commit b122f0d

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

0 commit comments

Comments
 (0)