scss-syntax.vim
scss-syntax.vim copied to clipboard
Support @forward and @use
This PR adds basic support for the @forward and @use rules, which were previously unsupported.
I followed the syntax highlighting rules on the https://sass-lang.com website; the "as" and "with" keywords are highlighted in the same color as "@forward" and "@use", and namespaces are highlighted in the same color as variables.
The only thing that doesn't currently work is parenthesized blocks of SCSS following a "with". I couldn't figure out a way to say "apply the regular syntax rules of the filetype within these parentheses", which feels like the kind of thing that should be easy but probably isn't.
I also updated the example.scss file with usage examples of the newly-supported rules.
This is my first time working with Vim syntax definitions; I was putting things together largely by scanning the built-in help and experimenting, so it's possible I've made a few beginner errors. If so please correct me.