Skip to content

Commit

Permalink
feat(tools): better look, add few params
Browse files Browse the repository at this point in the history
  • Loading branch information
daUnknownCoder committed Feb 17, 2024
1 parent 456ce94 commit 436c042
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions lua/NeutronVim/plugins/LSP/lsp-lens.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,40 @@ return {
"VidocqH/lsp-lens.nvim",
lazy = true,
event = "LspAttach",
opts = {
enable = true,
include_declaration = true,
sections = {
definitions = true,
},
},
config = function()
local SymbolKind = vim.lsp.protocol.SymbolKind
local icons_ok, icons = pcall(require, "NeutronVim.core.icons")
if not icons_ok then
print("Unable to import icons!")
end
local lens_status_ok, lens = pcall(require, "lsp-lens")
if not lens_status_ok then
print("lsp-lens not found!")
end
lens.setup({
enable = true,
include_declaration = true,
sections = {
definition = function(count)
return icons.kind.Declaration .. "Definitions: " .. count
end,
references = function(count)
return "ο’½ References: " .. count
end,
implements = function(count)
return icons.kind.Interface .. "Implements: " .. count
end,
git_authors = function(latest_author, count)
return "ξ™› " .. latest_author .. (count - 1 == 0 and "" or (" + " .. count - 1))
end,
},
target_symbol_kinds = {
SymbolKind.Function,
SymbolKind.Method,
SymbolKind.Interface,
SymbolKind.Property,
SymbolKind.Variable,
},
})
end,
}

0 comments on commit 436c042

Please sign in to comment.