In VSCode there’s an indication of the number of references found.
Is there something similar in sublime text with the use of a plugin?
In VSCode there’s an indication of the number of references found.
Is there something similar in sublime text with the use of a plugin?
These things are called “code lenses”. It’s somewhat specific to VSCode. They’re possible in LSP, but you need to write custom python code around it to handle the custom responses. They are rendered as annotations in ST.
Having said that, if it’s just “find references” you’re after, there’s already a builtin find-references, and LSP also provides a find-references.
I tried LSP and there’s no visual indicator with it.
See References is handy but it would be nice to see if a function is not used by seeing the 0 references
beside it.
Is it really that much of a time-saver though?
In any case, if you want something like that, like I mentioned the language server needs to support code lenses and you’d have to write python glue code. Looking at your screenshot, you seem to be using JS. LSP-typescript does not offer code lenses.
Would be a little bit of a timesaver to notice any functions that are no longer used in the scripts I’m writing.
I’m writing JScript.
There’s no langserver for JScript so it looks like it goes directly through the VSCode extension. https://microsoft.github.io/language-server-protocol/implementors/servers/
I barely remember a plugin adding such info via phantoms, but it caused text reflow and too much noise. I finally removed that as non-useful.