|
|
|
@ -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,
|
|
|
|
|
}
|
|
|
|
|