-
Notifications
You must be signed in to change notification settings - Fork 137
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
VSCode language specific settings #365
Comments
Hi - the problem with this is I don't think the extension API allows access to language specific settings. I've done it in another extension, but it's a hack and generates warnings in your settings files as far as I remember. |
Ah okay, too bad! Thanks anyway :) |
This would indeed be a nice feature. To enable language-specific settings, one needs to set |
@tobiasdiez Unfortunately it doesn't make any sense to make the regex language overridable because ripgrep does a file search - it has to be able to find things in any type of file. It could be changed for searching within editors, but that could result in inconsistent behaviour. I will have another think about it though. |
Doesn’t extension API allow to only search in comments instead of parsing the whole file ? I’m sure there is an issue on VSCode repo on that if it doesn’t. |
The extension is primarily designed to search files - searching only comments would be a big change and I don't think the API does support it - it would need a language parser to understand the comments, and at that point it might as well be part of a language based extension. |
There are workarounds like exposed in this issue. better comments parses files searching for specific language one line comments and block comments. It is pretty smart because it doesn’t use a general regex containing all the possible comments for any languages on each file but a very specific regex for each language detected. It doesn’t solve any issues but prevents some false detection on file that would contains line start with another specific language comment delimiter. |
I'm closing this as it's not something that fits with the way the extension is currently designed. |
Hey, thanks for Todo Tree, using it all the time!
It would be nice if, at least, the
todo-tree.regex.regex
setting can be configured per-language: https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settingsIt doesn't work right now. Thank you!
The text was updated successfully, but these errors were encountered: