Sublime Forum

Extracting language specific scope of a point

#1

Hi.

Is there any api to extract scope of a given point in file?

For example, I want to get class and method names from file (cs):

class A { public void M() { int i =3; // <-- point is here } }

And get the result that looks something like “A:M”

Didn’t find any in documentation. May be the only way to get this is parsing by myself or with 3d party libraries?
I know that it’s a difficult task, just was wondering if st3 has it in any form?

Thanx for help.

0 Likes

#2

You can try using this plugin sublime.wbond.net/packages/ScopeHunter

0 Likes

#3

ctrl+shift+p will display the scope at the cursor in the status area

0 Likes