fix: arguments for the `vim.lsp.Client.supports_method` method (#1356)
This commit is contained in:
		
							parent
							
								
									d2c006819a
								
							
						
					
					
						commit
						db78c0b217
					
				
							
								
								
									
										4
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										4
									
								
								init.lua
								
								
								
								
							|  | @ -564,7 +564,7 @@ require('lazy').setup({ | ||||||
|           -- |           -- | ||||||
|           -- When you move your cursor, the highlights will be cleared (the second autocommand). |           -- When you move your cursor, the highlights will be cleared (the second autocommand). | ||||||
|           local client = vim.lsp.get_client_by_id(event.data.client_id) |           local client = vim.lsp.get_client_by_id(event.data.client_id) | ||||||
|           if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then |           if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then | ||||||
|             local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) |             local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) | ||||||
|             vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { |             vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { | ||||||
|               buffer = event.buf, |               buffer = event.buf, | ||||||
|  | @ -591,7 +591,7 @@ require('lazy').setup({ | ||||||
|           -- code, if the language server you are using supports them |           -- code, if the language server you are using supports them | ||||||
|           -- |           -- | ||||||
|           -- This may be unwanted, since they displace some of your code |           -- This may be unwanted, since they displace some of your code | ||||||
|           if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then |           if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then | ||||||
|             map('<leader>th', function() |             map('<leader>th', function() | ||||||
|               vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) |               vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) | ||||||
|             end, '[T]oggle Inlay [H]ints') |             end, '[T]oggle Inlay [H]ints') | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Jonas Zeltner
						Jonas Zeltner