sublime-cpp11
sublime-cpp11 copied to clipboard
Function calls match as entities?
This line makes it so the names of functions in function calls match as entities. It seems that the "entity" rule determines what shows up in ST's "Jump to Definition" list. This means that virtually every call in the file ends up in the JtD list. (But only in some files? I'm not sure what trips it up sometimes. I guess this is what happens when you try to parse C++ with regexes.)
I changed it to "support.function.c++
" and it works much better, but I don't know much about how the syntax highlighting in ST works, so I'm not sure if this is the right thing to do. In any case, matching them as entities seems to be weird, at the very least.
Sorry for the high latency :)
The reason entity.name.function is used is so the syntax highlighting can match against only the function name. For example:
<key>name</key>
<string>Function Call</string>
<key>scope</key>
<string>meta.function-call entity.name.function</string>
Do you have a minimal snippet that recreates the issue? I can't seem to reproduce it on my own code base,
Sorry for the EVEN HIGHER latency D:
I don't know enough about how ST highlighting works to understand what that means :1
But as for a minimal snippet.. it happens with literally everything, even this:
void foo()
{
bar();
}
Both 'foo' and 'bar' will show up in the JtD list.
Weird, JtD only shows foo
for me.
What version of sublime are you using? I'm currently on ST3, so I'm wondering if maybe there's a ST2 specific issue here.
Yeah, I'm using ST2 build 2221.