-
Notifications
You must be signed in to change notification settings - Fork 22
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
Extension stopped working with v2.0.8? #69
Comments
More details please ... what extension version are you running; what's the definition of your highlight? |
Hi @jgclark Version: What I see: What I tested:
All the test has been done in a C codebase |
I am running VS Code 1.78 and TODO Highlight 2.0.8. I am also experiencing a similar issue. However, if I open a different workspace, it works sometimes. If you would like me to test anything specific let me know. {
"text": "TODO:",
"color": "yellow",
"border": "1px solid yellow",
"borderRadius": "2px",
"backgroundColor": "rgba(0,0,0,.2)",
"isWholeLine": true
},
{
"text": "CHECK:",
"color": "#34e8eb",
"border": "1px solid #34e8eb",
"borderRadius": "2px",
"backgroundColor": "rgba(0,0,0,.2)",
"isWholeLine": true
}, |
Thanks for the details. This is what I'm seeing on VS Code 1.77.3 / extension v2.0.8.: So note that the first one is OK for me, but the second is overridden by the built-in As you say "it works sometimes" I wonder if you or @g-berthiaume are using a single root or a "multi-root-workspace"? |
I've thought of something else for @g-berthiaume @RyanTheTechMan: The So please check that those 2 settings look suitable for the files you're editing in VSCode. |
Can confirm, after adding additional file extensions to the Seeing as many users are probably going to be coming here with the same "problem", perhaps it'd be best to pin this issue? |
I just added the following lines to my settings. Now knowing about this, it makes sense. "todohighlight.include": [
// ...
"**/*.cc",
"**/*.cpp",
"**/*.h",
"**/*.json"
] There would be a better way to handle this though, such as detecting when to use highlights based on the language rather than or in addition to the file extensions. If this sounds good, you could use the "Language Mode" (Language Identifiers) of the file in the If you would like me to make a fork, and do this myself, I absolutely can; though it will be a while since I am just entering finals week(s) at college! |
Thanks for commenting and the suggestion; I've now renamed the issue slightly and pinned it. |
Thanks for confirming it does work when you add the (now-necessary) settings.
I'm looking at another possible way of addressing this in #71. However, if that doesn't work out, then yes, I'd love some help to fix this, and the old request #2 about per-language support. But, for now, focus on your finals ;-) |
As suggested by @RyanTheTechMan, adding |
A further follow-up, @RyanTheTechMan: the suggestion at #72 seems sensible to me, and looks easier than per-language settings. What do you think? |
Overall, it is definitely the easier option, since most of it is already implemented. I would definitely recommend following this suggestion in #72 so that it is more of an opt-in sort of thing. In addition, if by default, we are wanting this to work in all languages and allow customization per language, I would suggest the following:
Now, with help from feature request #2, Here is a config example: "todohighlight.codeLanguages": [
"c", // Equivalent to { "language": "c", "globalKeywords": true, "keywords": [] }
"cpp", // Equivalent to { "language": "cpp", "globalKeywords": true, "keywords": [] }
"csharp", // Equivalent to { "language": "csharp", "globalKeywords": true, "keywords": [] }
{
"language": "java", // Required
"globalKeywords": false, // Defualts to true | If false, only keywords in "keywords" below will be highlighted
"keywords": [ // Defaults to []
{
"text": "FIX:",
"color": "red",
"isWholeLine": true,
},
]
},
{
"language": "python", // Required
"globalKeywords": true, // Defualts to true | If true, all keywords in "todohighlight.keywords" will be highlighted in addition to the ones in "keywords" below
"keywords": [ // Defaults to []
{
"text": "WARNING:",
"color": "yellow",
"isWholeLine": true,
},
]
},
], |
I see that I misunderstood #2. A way to implement this approach would be an opt-out method by using Language specific editor settings. I assume only a minimal amount of code will have to be implemented to support this in the code's current state. Implementing What do you think is the best way to handle this? |
If the extension gets "per-language support", I would think it makes the most sense to use VS Code's built-in away, since that's what it's meant to do. |
The extension appears to have stopped working.
There's no log message in the extension console.
I'm not sure how to provide more information.
The text was updated successfully, but these errors were encountered: