nvim: lsp: Enable code lens support
Relevant PR https://github.com/neovim/neovim/pull/13165
This commit is contained in:
parent
2fcdea1cb2
commit
7fb370f824
1 changed files with 5 additions and 0 deletions
|
@ -89,6 +89,11 @@ local on_attach = function(client, bufnr)
|
|||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gq', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
end
|
||||
|
||||
if client.resolved_capabilities.code_lens then
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "gl", "<cmd>lua vim.lsp.codelens.run()<CR>", opts)
|
||||
vim.api.nvim_command [[autocmd CursorHold,CursorHoldI,InsertLeave <buffer> lua vim.lsp.codelens.refresh()]]
|
||||
end
|
||||
|
||||
protocol.CompletionItemKind = {
|
||||
' '; -- text
|
||||
' '; -- method
|
||||
|
|
Loading…
Reference in a new issue