-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scope inspector bug when extending C++ syntax highlighting through Textmate grammar #163
Comments
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 |
I've tried your suggestion (which is smart since the hypothesis could've been another C++ language rule parsing the However, the scope inspector is still unable to pick up my custom scope. Was thinking of using a derived scopename like 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 |
same as in https://stackoverflow.com/a/78961689/12817801 Remove "injectionSelector": "L:source.cpp -string -comment" https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#injection-grammars |
Steps to Reproduce:
package.json
to contribute correctly (see snippet 2)Snippet 1)
Snippet 2:
The text was updated successfully, but these errors were encountered: