nvim: lsp: Fix luacheck warning on setting non-standard global variable

This commit is contained in:
Sanchayan Maity 2023-03-06 13:32:39 +05:30
parent f8a25ac9f7
commit c37a0db46a
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -18,11 +18,13 @@ local function preview_location_callback(_, result)
vim.lsp.util.preview_location(result[1])
end
function PeekDefinition()
local function peek_definition()
local params = vim.lsp.util.make_position_params()
return vim.lsp.buf_request(0, 'textDocument/definition', params, preview_location_callback)
end
_G.PeekDefinition = peek_definition
protocol.CompletionItemKind = {
' Text' ;
' Method' ;