bugfix issue #126

neovim_0.6
ray-x 2 years ago
parent c3f6b14233
commit b89811b1b6

@ -214,7 +214,8 @@ _G.nav_doc_hl = function()
end
local function documentHighlight()
api.nvim_exec([[
api.nvim_exec(
[[
autocmd ColorScheme * |
hi default LspReferenceRead cterm=bold gui=Bold ctermbg=yellow guifg=yellow guibg=purple4 |
hi default LspReferenceText cterm=bold gui=Bold ctermbg=red guifg=SlateBlue guibg=MidnightBlue |
@ -225,7 +226,9 @@ local function documentHighlight()
autocmd CursorHold <buffer> lua nav_doc_hl()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
]], false)
]],
false
)
vim.lsp.handlers['textDocument/documentHighlight'] = mk_handler(function(err, result, ctx)
local bufnr = ctx.bufnr or api.nvim_get_current_buf()
if err then
@ -257,5 +260,5 @@ return {
handle_document_highlight = handle_document_highlight,
hi_symbol = hi_symbol,
nohl = nohl,
cmd_nohl = cmd_nohl
cmd_nohl = cmd_nohl,
}

@ -112,7 +112,7 @@ M.workspace_symbol_handler = mk_handler(function(err, result, ctx, cfg)
vim.notify('failed to get workspace symbol' .. vim.inspect(ctx), vim.lsp.log_levels.WARN)
end
if not result or vim.tbl_isempty(result) then
vim.notify('symbol not found for buf' .. vim.inpsect(ctx), vim.lsp.log_levels.WARN)
vim.notify('symbol not found for buf' .. vim.inspect(ctx), vim.lsp.log_levels.WARN)
return
end
log(result[1])

Loading…
Cancel
Save