feat(nvim): symbol usage is show if there is more than 1 reference

This commit is contained in:
Sergio Laín 2024-01-03 10:59:13 +01:00
parent d15bfcfc66
commit 7778f60f93
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -7,5 +7,16 @@ return {
return "BufRead"
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,
},
}