✨ feat(nvim): symbol usage is show if there is more than 1 reference
This commit is contained in:
parent
d15bfcfc66
commit
7778f60f93
1 changed files with 12 additions and 1 deletions
|
@ -7,5 +7,16 @@ return {
|
||||||
return "BufRead"
|
return "BufRead"
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
opts = {},
|
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,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue