Skip to content

Commit 88434df

Browse files
jrentlezJeroen
authored andcommitted
fix: arguments for the vim.lsp.Client.supports_method method (nvim-lua#1356)
1 parent abb95e6 commit 88434df

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
@@ -482,7 +482,7 @@ require('lazy').setup({
482482
--
483483
-- When you move your cursor, the highlights will be cleared (the second autocommand).
484484
local client = vim.lsp.get_client_by_id(event.data.client_id)
485-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
485+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
486486
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
487487
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
488488
buffer = event.buf,
@@ -509,7 +509,7 @@ require('lazy').setup({
509509
-- code, if the language server you are using supports them
510510
--
511511
-- This may be unwanted, since they displace some of your code
512-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
512+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
513513
map('<leader>th', function()
514514
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
515515
end, '[T]oggle Inlay [H]ints')

0 commit comments

Comments
 (0)