2a9a5afbb2
1. Python decorators begin a compound statement, so they only appear at the start of a line. So match at the line start to avoid giving decorator colors to matrix multiplication (@) expressions. Source: https://docs.python.org/3/reference/compound_stmts.html#function-definitions 2. Python decorators go to the end of the line and might not include parentheses (for example @functools.cache). So instead of matching everything until an `(`, just match as many non-`(` characters as possible---which both catches the @functools.cache example and allows decorator parameters to fall back to the default color. 3. Instead of hardcoding `brightgreen` (which railscast.micro also complains about), color decorators as `preproc` (otherwise unused by the python syntax files, and arguably the right colorscheme group to be using for syntactic sugars anyway). Note this will change decorator colors---for example from bright green to kinda brown on monokai, and from yellow to more of a light orange on railscast. |
||
---|---|---|
.. | ||
colorschemes | ||
help | ||
plugins | ||
syntax | ||
README.md | ||
runtime.go | ||
runtime_test.go |
Runtime files for Micro
This directory will be embedded in the Go binary for portability, but it may just as well be put in ~/.config/micro
. If you would like to make your own colorschemes
and syntax files, you can put them in ~/.config/micro/colorschemes
and ~/.config/micro/syntax
respectively.