Conversation
|
Hey! Thanks for this. I didn't think to add YAML since it's so simple and could just be processed as text. Happy to in could this, but is there anything in the query we're actually excluding? |
|
Hey. At this point you're right. Nothing is omitted. Since yaml files are heavily used for translation files i was planing to write a solution on how to allow per file dictionary configuration. Another thing that would make sense is that it would be possible to differentiate between keys and values. The reason why I want to do this because it is possible in cases where you use multiple dictionaries that some words overlap. So specifying a language to check for a specific file or even part of the file would make sense in some cases. |
|
Merged! Thanks. Regarding the per-file scoping, this feels like a good use case for it. I was also thinking about mono-repo support via multiple config files that would scope rules to just that subdirectory, but I do like having just one config file. With multiple configs, we'd have to work out inheritance rules (do settings in subdirectories overwrite, or 'add' to higher-level ones?). That could get complicated, and would likely have to change depending on the specific config type. The single file way could look like: # Global settings
words=[]
[scope.config/locales/**/*.lv*]
words=[]Although I'm not sure what is possible in TOML. |
|
K, I put together a proposal for scoped configs here: #208 If you take a look, let me know what you think! |
Add YAML support using https://github.com/tree-sitter-grammars/tree-sitter-yaml