Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 6c591ab

Browse files
authored
Merge pull request #278 from li-maisiliym-xyz/handlersFix
Fix missing `handlers` table
2 parents 2331d67 + 55a729c commit 6c591ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/completion/hover.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ M.autoOpenHoverInPopup = function()
306306
for _, client in pairs(vim.lsp.buf_get_clients(0)) do
307307
local default_handler = (client.config.handlers or {})['textDocument/hover'] or vim.lsp.handlers['textDocument/hover']
308308
if default_handler ~= handler_function then
309+
if not client.config.handlers then client.config.handlers = {} end
309310
client.config.handlers['textDocument/hover'] = handler_function
310311
end
311312
end

0 commit comments

Comments
 (0)