diff options
| author | 2021-01-08 15:12:44 -0500 | |
|---|---|---|
| committer | 2021-01-08 15:12:44 -0500 | |
| commit | 3ba6a6a5a04b1e636f7f80539dd987fd7c761154 (patch) | |
| tree | e78977da170e6c05977fc301d66f61efa614331a /dot_config/micro/syntax/rc.yaml | |
| parent | zsh: add ~/.local/box to path (diff) | |
micro: add rc syntax, even though it sucks
Diffstat (limited to 'dot_config/micro/syntax/rc.yaml')
| -rw-r--r-- | dot_config/micro/syntax/rc.yaml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dot_config/micro/syntax/rc.yaml b/dot_config/micro/syntax/rc.yaml new file mode 100644 index 0000000..62b0c85 --- /dev/null +++ b/dot_config/micro/syntax/rc.yaml @@ -0,0 +1,32 @@ +filetype: p9rc + +# this is all buggy and shitty but it's better than nothing lmao + +detect: + filename: ".rc$" + header: "^#!.*/(env +)?rc( |$)" + +rules: + # Flow control + - statement: "\\b(if|else|while|for|in|switch|case|fn)\\b" + + # Logical operators + - special: "(\\!|\\|\\||&&|~|\\^|=|`)" + + # Builtins + - type: "\\b(\\.|break|builtin|cd|continue|echo|eval|exec|exit|flag|limit|newgrp|return|shift|umask|wait|whatis)\\b" + + # Variables + - identifier: "\\$(\"|\\^)?[0-9A-Za-z_!@#$*?-]+(\\([^\\)]*\\))?" + + # String literals + - constant.string: + start: "'" + end: "'" + rules: [] + + - comment: + start: "(^|\\s)#" + end: "$" + rules: + - todo: "(TODO|XXX|FIXME):?" |
