micro/runtime
Andrew Geng 2a9a5afbb2
Fix python decorator syntax. (#2827)
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.
2023-10-16 11:08:37 +02:00
..
colorschemes Fix gruvbox-tc colorscheme (#2240) 2022-07-24 14:11:16 -07:00
help help: fix incorrect instructions for disabling key binding (#2943) 2023-10-16 10:46:01 +02:00
plugins Don't auto-detect commenttype if last_ft is empty 2023-02-15 21:57:12 -08:00
syntax Fix python decorator syntax. (#2827) 2023-10-16 11:08:37 +02:00
README.md Update syntax readme and docs 2017-03-26 18:58:08 -04:00
runtime.go refactor(runtime): simplify AssetDir() (#2761) 2023-02-28 01:31:51 -08:00
runtime_test.go refactor(runtime): simplify AssetDir() (#2761) 2023-02-28 01:31:51 -08:00

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.