Skip to content

Commit c8c66fe

Browse files
jrentlezwvan1901
authored andcommitted
fix: arguments for the vim.lsp.Client.supports_method method (nvim-lua#1356)
1 parent 67e9064 commit c8c66fe

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
@@ -494,7 +494,7 @@ require('lazy').setup({
494494
--
495495
-- When you move your cursor, the highlights will be cleared (the second autocommand).
496496
local client = vim.lsp.get_client_by_id(event.data.client_id)
497-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
497+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
498498
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
499499
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
500500
buffer = event.buf,
@@ -521,7 +521,7 @@ require('lazy').setup({
521521
-- code, if the language server you are using supports them
522522
--
523523
-- This may be unwanted, since they displace some of your code
524-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
524+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
525525
map('<leader>th', function()
526526
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
527527
end, '[T]oggle Inlay [H]ints')

0 commit comments

Comments
 (0)