init
This commit is contained in:
22
nvim/lua/plugins/extras/lsp/symbol-usage.lua
Normal file
22
nvim/lua/plugins/extras/lsp/symbol-usage.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
"Wansmer/symbol-usage.nvim",
|
||||
event = function()
|
||||
if vim.fn.has("nvim-0.10") == 1 then
|
||||
return "LspAttach"
|
||||
else
|
||||
return "BufRead"
|
||||
end
|
||||
end,
|
||||
opts = {
|
||||
vt_position = "end_of_line",
|
||||
text_format = function(symbol)
|
||||
if symbol.references then
|
||||
local usage = symbol.references <= 1 and "usage" or "usages"
|
||||
local num = symbol.references == 0 and "no" or symbol.references
|
||||
return string.format(" %s %s", num, usage)
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user