Open felipejinli opened 2 years ago
TextMate is pretty finicky. It's possible it's an inspect scope issue, but I'd bet it's a pattern matching issue.
Might want to check if it works when you move the clog outside of main. (Which I know sounds dumb cause you'd never use it top level but it may reveal the issue)
I maintain the C++ syntax so I feel obligated to say injections are not going to be fun. You might be able to get away with something simple like clog though. The ^\\s*
you've makes me assume you know what you're doing though 👍.
I've tried your suggestion (which is smart since the hypothesis could've been another C++ language rule parsing the main
and thus not using my custom expression language rule)
However, the scope inspector is still unable to pick up my custom scope.
Was thinking of using a derived scopename like source.cpp.cpdebug
since that would give my language rules higher precedence than that of C++'s original but it doesn't work.
I've uploaded my vscode extension code to the following repo (https://github.com/felipejinli/vscode-hide-logs). Would you mind taking a look? Really appreciate your help :)
Currently I probably can't take a good look at it. Most of the time textmate scope issues require trial an error to figure it out even for the best of us.
In 4 months I might be doing some work on the C++ syntax. I've wanted injections in the past so I might build-in some handy scopes like a source.cpp#inject-everywhere
to make this process easier.
Steps to Reproduce:
package.json
to contribute correctly (see snippet 2)Snippet 1)
Snippet 2: