bunmicro 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/PORTING.md +34 -0
- package/README.md +153 -0
- package/bmi +5 -0
- package/bun.lock +17 -0
- package/bunmicro +5 -0
- package/hlw.md +5 -0
- package/package.json +18 -0
- package/runtime/colorschemes/atom-dark.micro +33 -0
- package/runtime/colorschemes/bubblegum.micro +31 -0
- package/runtime/colorschemes/cmc-16.micro +47 -0
- package/runtime/colorschemes/cmc-tc.micro +43 -0
- package/runtime/colorschemes/darcula.micro +34 -0
- package/runtime/colorschemes/default.micro +1 -0
- package/runtime/colorschemes/dracula-tc.micro +49 -0
- package/runtime/colorschemes/dukedark-tc.micro +38 -0
- package/runtime/colorschemes/dukelight-tc.micro +38 -0
- package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
- package/runtime/colorschemes/geany.micro +29 -0
- package/runtime/colorschemes/gotham.micro +29 -0
- package/runtime/colorschemes/gruvbox-tc.micro +29 -0
- package/runtime/colorschemes/gruvbox.micro +26 -0
- package/runtime/colorschemes/material-tc.micro +36 -0
- package/runtime/colorschemes/monokai-dark.micro +28 -0
- package/runtime/colorschemes/monokai.micro +34 -0
- package/runtime/colorschemes/one-dark.micro +39 -0
- package/runtime/colorschemes/railscast.micro +37 -0
- package/runtime/colorschemes/simple.micro +33 -0
- package/runtime/colorschemes/solarized-tc.micro +31 -0
- package/runtime/colorschemes/solarized.micro +30 -0
- package/runtime/colorschemes/sunny-day.micro +29 -0
- package/runtime/colorschemes/twilight.micro +40 -0
- package/runtime/colorschemes/zenburn.micro +30 -0
- package/runtime/help/actions.md +161 -0
- package/runtime/help/colors.md +421 -0
- package/runtime/help/commands.md +161 -0
- package/runtime/help/copypaste.md +149 -0
- package/runtime/help/defaultkeys.md +141 -0
- package/runtime/help/help.md +63 -0
- package/runtime/help/keybindings.md +760 -0
- package/runtime/help/linter.md +90 -0
- package/runtime/help/options.md +701 -0
- package/runtime/help/plugins.md +544 -0
- package/runtime/help/tutorial.md +112 -0
- package/runtime/jsplugins/chapter/chapter.js +108 -0
- package/runtime/jsplugins/diff/diff.js +46 -0
- package/runtime/jsplugins/example/example.js +108 -0
- package/runtime/jsplugins/linter/linter.js +281 -0
- package/runtime/plugins/autoclose/autoclose.lua +75 -0
- package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
- package/runtime/plugins/literate/README.md +5 -0
- package/runtime/plugins/literate/literate.lua +55 -0
- package/runtime/plugins/status/help/status.md +21 -0
- package/runtime/plugins/status/status.lua +62 -0
- package/runtime/syntax/LICENSE +22 -0
- package/runtime/syntax/PowerShell.yaml +128 -0
- package/runtime/syntax/README.md +63 -0
- package/runtime/syntax/ada.yaml +43 -0
- package/runtime/syntax/apacheconf.yaml +59 -0
- package/runtime/syntax/arduino.yaml +101 -0
- package/runtime/syntax/asciidoc.yaml +51 -0
- package/runtime/syntax/asm.yaml +123 -0
- package/runtime/syntax/ats.yaml +99 -0
- package/runtime/syntax/awk.yaml +44 -0
- package/runtime/syntax/b.yaml +87 -0
- package/runtime/syntax/bat.yaml +57 -0
- package/runtime/syntax/c.yaml +60 -0
- package/runtime/syntax/caddyfile.yaml +23 -0
- package/runtime/syntax/cake.yaml +7 -0
- package/runtime/syntax/clojure.yaml +38 -0
- package/runtime/syntax/cmake.yaml +42 -0
- package/runtime/syntax/coffeescript.yaml +56 -0
- package/runtime/syntax/colortest.yaml +19 -0
- package/runtime/syntax/conky.yaml +17 -0
- package/runtime/syntax/cpp.yaml +91 -0
- package/runtime/syntax/crontab.yaml +36 -0
- package/runtime/syntax/crystal.yaml +72 -0
- package/runtime/syntax/csharp.yaml +52 -0
- package/runtime/syntax/css.yaml +44 -0
- package/runtime/syntax/csx.yaml +8 -0
- package/runtime/syntax/cuda.yaml +68 -0
- package/runtime/syntax/cython.yaml +52 -0
- package/runtime/syntax/d.yaml +121 -0
- package/runtime/syntax/dart.yaml +46 -0
- package/runtime/syntax/default.yaml +10 -0
- package/runtime/syntax/dockerfile.yaml +36 -0
- package/runtime/syntax/dot.yaml +29 -0
- package/runtime/syntax/elixir.yaml +30 -0
- package/runtime/syntax/elm.yaml +38 -0
- package/runtime/syntax/erb.yaml +42 -0
- package/runtime/syntax/erlang.yaml +45 -0
- package/runtime/syntax/fish.yaml +48 -0
- package/runtime/syntax/forth.yaml +34 -0
- package/runtime/syntax/fortran.yaml +64 -0
- package/runtime/syntax/freebsd-kernel.yaml +14 -0
- package/runtime/syntax/fsharp.yaml +48 -0
- package/runtime/syntax/gdscript.yaml +61 -0
- package/runtime/syntax/gemini.yaml +19 -0
- package/runtime/syntax/gentoo-ebuild.yaml +48 -0
- package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
- package/runtime/syntax/git-commit.yaml +35 -0
- package/runtime/syntax/git-config.yaml +14 -0
- package/runtime/syntax/git-rebase-todo.yaml +19 -0
- package/runtime/syntax/gleam.yaml +69 -0
- package/runtime/syntax/glsl.yaml +26 -0
- package/runtime/syntax/gnuplot.yaml +15 -0
- package/runtime/syntax/go.yaml +62 -0
- package/runtime/syntax/godoc.yaml +17 -0
- package/runtime/syntax/golo.yaml +73 -0
- package/runtime/syntax/gomod.yaml +31 -0
- package/runtime/syntax/graphql.yaml +47 -0
- package/runtime/syntax/groff.yaml +30 -0
- package/runtime/syntax/groovy.yaml +111 -0
- package/runtime/syntax/haml.yaml +16 -0
- package/runtime/syntax/hare.yaml +52 -0
- package/runtime/syntax/haskell.yaml +52 -0
- package/runtime/syntax/hc.yaml +52 -0
- package/runtime/syntax/html.yaml +70 -0
- package/runtime/syntax/html4.yaml +25 -0
- package/runtime/syntax/html5.yaml +25 -0
- package/runtime/syntax/ini.yaml +23 -0
- package/runtime/syntax/inputrc.yaml +14 -0
- package/runtime/syntax/java.yaml +37 -0
- package/runtime/syntax/javascript.yaml +76 -0
- package/runtime/syntax/jinja2.yaml +19 -0
- package/runtime/syntax/json.yaml +39 -0
- package/runtime/syntax/jsonnet.yaml +92 -0
- package/runtime/syntax/julia.yaml +57 -0
- package/runtime/syntax/justfile.yaml +40 -0
- package/runtime/syntax/keymap.yaml +27 -0
- package/runtime/syntax/kickstart.yaml +16 -0
- package/runtime/syntax/kotlin.yaml +66 -0
- package/runtime/syntax/kvlang.yaml +67 -0
- package/runtime/syntax/ledger.yaml +14 -0
- package/runtime/syntax/lfe.yaml +17 -0
- package/runtime/syntax/lilypond.yaml +26 -0
- package/runtime/syntax/lisp.yaml +17 -0
- package/runtime/syntax/log.yaml +92 -0
- package/runtime/syntax/lua.yaml +111 -0
- package/runtime/syntax/mail.yaml +25 -0
- package/runtime/syntax/makefile.yaml +38 -0
- package/runtime/syntax/man.yaml +12 -0
- package/runtime/syntax/markdown.yaml +49 -0
- package/runtime/syntax/mc.yaml +23 -0
- package/runtime/syntax/meson.yaml +51 -0
- package/runtime/syntax/micro.yaml +34 -0
- package/runtime/syntax/mpdconf.yaml +13 -0
- package/runtime/syntax/msbuild.yaml +6 -0
- package/runtime/syntax/nanorc.yaml +16 -0
- package/runtime/syntax/nftables.yaml +30 -0
- package/runtime/syntax/nginx.yaml +22 -0
- package/runtime/syntax/nim.yaml +27 -0
- package/runtime/syntax/nix.yaml +32 -0
- package/runtime/syntax/nu.yaml +114 -0
- package/runtime/syntax/objc.yaml +60 -0
- package/runtime/syntax/ocaml.yaml +43 -0
- package/runtime/syntax/octave.yaml +83 -0
- package/runtime/syntax/odin.yaml +64 -0
- package/runtime/syntax/pascal.yaml +45 -0
- package/runtime/syntax/patch.yaml +14 -0
- package/runtime/syntax/peg.yaml +16 -0
- package/runtime/syntax/perl.yaml +58 -0
- package/runtime/syntax/php.yaml +60 -0
- package/runtime/syntax/pkg-config.yaml +12 -0
- package/runtime/syntax/po.yaml +12 -0
- package/runtime/syntax/pony.yaml +37 -0
- package/runtime/syntax/pov.yaml +21 -0
- package/runtime/syntax/privoxy-action.yaml +14 -0
- package/runtime/syntax/privoxy-config.yaml +10 -0
- package/runtime/syntax/privoxy-filter.yaml +12 -0
- package/runtime/syntax/proto.yaml +40 -0
- package/runtime/syntax/prql.yaml +84 -0
- package/runtime/syntax/puppet.yaml +22 -0
- package/runtime/syntax/python2.yaml +60 -0
- package/runtime/syntax/python3.yaml +62 -0
- package/runtime/syntax/r.yaml +32 -0
- package/runtime/syntax/raku.yaml +42 -0
- package/runtime/syntax/reST.yaml +18 -0
- package/runtime/syntax/renpy.yaml +15 -0
- package/runtime/syntax/rpmspec.yaml +43 -0
- package/runtime/syntax/ruby.yaml +73 -0
- package/runtime/syntax/rust.yaml +78 -0
- package/runtime/syntax/sage.yaml +60 -0
- package/runtime/syntax/scad.yaml +53 -0
- package/runtime/syntax/scala.yaml +33 -0
- package/runtime/syntax/sed.yaml +13 -0
- package/runtime/syntax/sh.yaml +69 -0
- package/runtime/syntax/sls.yaml +15 -0
- package/runtime/syntax/smalltalk.yaml +55 -0
- package/runtime/syntax/solidity.yaml +41 -0
- package/runtime/syntax/sql.yaml +35 -0
- package/runtime/syntax/stata.yaml +67 -0
- package/runtime/syntax/svelte.yaml +27 -0
- package/runtime/syntax/swift.yaml +103 -0
- package/runtime/syntax/systemd.yaml +16 -0
- package/runtime/syntax/tcl.yaml +18 -0
- package/runtime/syntax/terraform.yaml +87 -0
- package/runtime/syntax/tex.yaml +32 -0
- package/runtime/syntax/toml.yaml +56 -0
- package/runtime/syntax/twig.yaml +55 -0
- package/runtime/syntax/typescript.yaml +49 -0
- package/runtime/syntax/v.yaml +80 -0
- package/runtime/syntax/vala.yaml +26 -0
- package/runtime/syntax/verilog.yaml +60 -0
- package/runtime/syntax/vhdl.yaml +37 -0
- package/runtime/syntax/vi.yaml +31 -0
- package/runtime/syntax/vue.yaml +64 -0
- package/runtime/syntax/xml.yaml +37 -0
- package/runtime/syntax/xresources.yaml +14 -0
- package/runtime/syntax/yaml.yaml +34 -0
- package/runtime/syntax/yum.yaml +12 -0
- package/runtime/syntax/zig.yaml +52 -0
- package/runtime/syntax/zscript.yaml +72 -0
- package/runtime/syntax/zsh.yaml +52 -0
- package/src/buffer/buffer.js +126 -0
- package/src/buffer/loc.js +38 -0
- package/src/buffer/message.js +29 -0
- package/src/config/colorscheme.js +109 -0
- package/src/config/config.js +118 -0
- package/src/config/defaults.js +102 -0
- package/src/display/ansi-style.js +60 -0
- package/src/highlight/highlighter.js +237 -0
- package/src/highlight/parser.js +137 -0
- package/src/index.js +5942 -0
- package/src/lua/engine.js +38 -0
- package/src/platform/archive.js +50 -0
- package/src/platform/clipboard.js +160 -0
- package/src/platform/commands.js +140 -0
- package/src/plugins/js-bridge.js +902 -0
- package/src/plugins/manager.js +619 -0
- package/src/runtime/registry.js +89 -0
- package/src/screen/cell-buffer.js +81 -0
- package/src/screen/events.js +263 -0
- package/src/screen/screen.js +118 -0
- package/src/screen/vt100.js +391 -0
- package/src/shell/shell.js +70 -0
- package/todo.txt +359 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
filetype: "kvlang"
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.kv$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# layouts
|
|
8
|
+
- special: "\\b[a-z].+"
|
|
9
|
+
- identifier: "\\b(self|app|root)\\b"
|
|
10
|
+
|
|
11
|
+
- type: "\\b[A-Z].+"
|
|
12
|
+
- type: "\\b(AnchorLayout|BoxLayout|FloatLayout|RelativeLayout|GridLayout|PageLayout|StackLayout)\\b"
|
|
13
|
+
|
|
14
|
+
- type: "\\b(canvas)\\b"
|
|
15
|
+
|
|
16
|
+
# functions
|
|
17
|
+
- identifier.function: "[a-zA-Z_0-9]+\\("
|
|
18
|
+
|
|
19
|
+
# built-in functions
|
|
20
|
+
- type: "\\b(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes)\\b"
|
|
21
|
+
- type: "\\b(callable|chr|classmethod|compile|copyright|credits|oct)\\b"
|
|
22
|
+
- type: "\\b(delattr|dict|dir|display|divmod|enumerate|eval|filter)\\b"
|
|
23
|
+
- type: "\\b(float|format|frozenset|get_ipython|getattr|globals|type)\\b"
|
|
24
|
+
- type: "\\b(hash|help|hex|id|input|int|isinstance|issubclass|iter|len)\\b"
|
|
25
|
+
- type: "\\b(license|list|locals|map|max|memoryview|min|next|object)\\b"
|
|
26
|
+
- type: "\\b(open|ord|pow|print|property|range|repr|reversed|round|set)\\b"
|
|
27
|
+
- type: "\\b(setattr|slice|sorted|staticmethod|hasattr|super|tuple|str)\\b"
|
|
28
|
+
- type: "\\b(vars|zip|exec|sum|complex)\\b"
|
|
29
|
+
|
|
30
|
+
# keywords
|
|
31
|
+
- statement.built_in: "\\b(and|as|assert|async|await|break|class|continue|def)\\b"
|
|
32
|
+
- statement.built_in: "\\b(del|elif|else|except|finally|for|from|global|if)\\b"
|
|
33
|
+
- statement.built_in: "\\b(import|in|is|lambda|nonlocal|not|or|pass|raise)\\b"
|
|
34
|
+
- statement.built_in: "\\b(return|try|while|with|yield|match|case)\\b"
|
|
35
|
+
|
|
36
|
+
# operators
|
|
37
|
+
- symbol.operator: "([~^.:;,+*|=!\\%]|<|>|/|-|&)"
|
|
38
|
+
|
|
39
|
+
# parentheses
|
|
40
|
+
- symbol.brackets: "([(){}]|\\[|\\])"
|
|
41
|
+
|
|
42
|
+
# numbers
|
|
43
|
+
- constant.number: "\\b[0-9](_?[0-9])*(\\.([0-9](_?[0-9])*)?)?(e[0-9](_?[0-9])*)?\\b" # decimal
|
|
44
|
+
- constant.number: "\\b0b(_?[01])+\\b" # bin
|
|
45
|
+
- constant.number: "\\b0o(_?[0-7])+\\b" # oct
|
|
46
|
+
- constant.number: "\\b0x(_?[0-9a-f])+\\b" # hex
|
|
47
|
+
|
|
48
|
+
- constant.bool.none: "\\b(None)\\b"
|
|
49
|
+
- constant.bool.true: "\\b(True)\\b"
|
|
50
|
+
- constant.bool.false: "\\b(False)\\b"
|
|
51
|
+
|
|
52
|
+
# strings
|
|
53
|
+
- constant.string:
|
|
54
|
+
start: "\""
|
|
55
|
+
end: "(\"|$)"
|
|
56
|
+
skip: "\\\\."
|
|
57
|
+
rules: []
|
|
58
|
+
- constant.string:
|
|
59
|
+
start: "'"
|
|
60
|
+
end: "('|$)"
|
|
61
|
+
skip: "\\\\."
|
|
62
|
+
rules: []
|
|
63
|
+
|
|
64
|
+
- comment:
|
|
65
|
+
start: "#"
|
|
66
|
+
end: "$"
|
|
67
|
+
rules: []
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
filetype: ledger
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(^|\\.|/)(ledger|ldgr|beancount|bnct)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- special: "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*"
|
|
8
|
+
- constant: "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}"
|
|
9
|
+
- statement: "^~ .*"
|
|
10
|
+
- identifier.var: "^= .*"
|
|
11
|
+
- identifier: "^[[:space:]]+(![[:space:]]+)?\\(?[A-Za-z ]+(:[A-Za-z ]+)*\\)?"
|
|
12
|
+
- identifier: "^[[:space:]]+(![[:space:]]+)?\\(?[A-Za-z_\\-]+(:[A-Za-z_\\-]+)*\\)?"
|
|
13
|
+
- symbol: "[*!]"
|
|
14
|
+
- comment: "^[[:space:]]*;.*"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
filetype: lfe
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "lfe$|\\.lfe$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- symbol.brackets: "\\(|\\)"
|
|
8
|
+
- type: "defun|define-syntax|define|defmacro|defmodule|export"
|
|
9
|
+
- constant: "\\ [A-Za-z][A-Za-z0-9_-]+\\ "
|
|
10
|
+
- symbol.operator: "\\(([\\-+*/<>]|<=|>=)|'"
|
|
11
|
+
- constant.number: "\\b[0-9]+\\b"
|
|
12
|
+
- constant.string: "\\\"(\\\\.|[^\"])*\\\""
|
|
13
|
+
- special: "['|`][A-Za-z][A-Za-z0-9_\\-]+"
|
|
14
|
+
- constant.specialChar: "\\\\.?"
|
|
15
|
+
- comment: "(^|[[:space:]]);.*"
|
|
16
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
17
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
filetype: lilypond
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.ly$|\\.ily$|\\.lly$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- constant.number: "\\d+"
|
|
8
|
+
- identifier: "\\b(staff|spacing|signature|routine|notes|handler|corrected|beams|arpeggios|Volta_engraver|Voice|Vertical_align_engraver|Vaticana_ligature_engraver|VaticanaVoice|VaticanaStaff|Tweak_engraver|Tuplet_engraver|Trill_spanner_engraver|Timing_translator|Time_signature_performer|Time_signature_engraver|Tie_performer|Tie_engraver|Text_spanner_engraver|Text_engraver|Tempo_performer|Tab_tie_follow_engraver|Tab_staff_symbol_engraver|Tab_note_heads_engraver|TabVoice|TabStaff|System_start_delimiter_engraver|Stem_engraver|Stanza_number_engraver|Stanza_number_align_engraver|Staff_symbol_engraver|Staff_performer|Staff_collecting_engraver|StaffGroup|Staff|Spanner_break_forbid_engraver|Span_bar_stub_engraver|Span_bar_engraver|Span_arpeggio_engraver|Spacing_engraver|Slur_performer|Slur_engraver|Slash_repeat_engraver|Separating_line_group_engraver|Script_row_engraver|Script_engraver|Script_column_engraver|Score|Rhythmic_column_engraver|RhythmicStaff|Rest_engraver|Rest_collision_engraver|Repeat_tie_engraver|Repeat_acknowledge_engraver|Pure_from_neighbor_engraver|Pitched_trill_engraver|Pitch_squash_engraver|Piano_pedal_performer|Piano_pedal_engraver|Piano_pedal_align_engraver|PianoStaff|Phrasing_slur_engraver|PetrucciVoice|PetrucciStaff|Percent_repeat_engraver|Part_combine_engraver|Parenthesis_engraver|Paper_column_engraver|Output_property_engraver|Ottava_spanner_engraver|OneStaff|NullVoice|Note_spacing_engraver|Note_performer|Note_name_engraver|Note_heads_engraver|Note_head_line_engraver|NoteName\\|NoteHead|New_fingering_engraver|Multi_measure_rest_engraver|Midi_control_function_performer|Metronome_mark_engraver|Mensural_ligature_engraver|MensuralVoice|MensuralStaff|Mark_engraver|Lyrics|Lyric_performer|Lyric_engraver|Ligature_bracket_engraver|Ledger_line_engraver|Laissez_vibrer_engraver|Kievan_ligature_engraver|KievanVoice|KievanStaff|Key_performer|Key_engraver|Keep_alive_together_engraver|Instrument_switch_engraver|Instrument_name_engraver|Hyphen_engraver|Grob_pq_engraver|GregorianTranscriptionVoice|GregorianTranscriptionStaff|GrandStaff|Grace_spacing_engraver|Grace_engraver|Grace_beam_engraver|Grace_auto_beam_engraver|Global|Glissando_engraver|Fretboard_engraver|FretBoards|Forbid_line_break_engraver|Footnote_engraver|Font_size_engraver|Fingering_engraver|Fingering_column_engraver|Figured_bass_position_engraver|Figured_bass_engraver|FiguredBass|Extender_engraver|Episema_engraver|Dynamics|Dynamic_performer|Dynamic_engraver|Dynamic_align_engraver|Drum_notes_engraver|Drum_note_performer|DrumVoice|DrumStaff|Double_percent_repeat_engraver|Dots_engraver|Dot_column_engraver|Devnull|Default_bar_line_engraver|Custos_engraver|Cue_clef_engraver|CueVoice|Control_track_performer|Concurrent_hairpin_engraver|Collision_engraver|Cluster_spanner_engraver|Clef_engraver|Chord_tremolo_engraver|Chord_name_engraver|ChordNames|ChoirStaff|Breathing_sign_engraver|Break_align_engraver|Bend_engraver|Beam_performer|Beam_engraver|Beam_collision_engraver|Bar_number_engraver|Bar_engraver|Axis_group_engraver|Auto_beam_engraver|Arpeggio_engraver|Accidental_engraver|Score)\\b"
|
|
9
|
+
- statement: "[-_^]?\\\\[-A-Za-z_]+"
|
|
10
|
+
- preproc: "\\b(((gisis|gis|geses|ges|g|fisis|fis|feses|fes|f|eisis|eis|eeses|ees|e|disis|dis|deses|des|d|cisis|cis|ceses|ces|c|bisis|bis|beses|bes|b|aisis|ais|aeses|aes|a)[,']*[?!]?)|s|r|R|q)(128|64|32|16|8|4|2|1|\\\\breve|\\\\longa|\\\\maxima)?([^\\\\\\w]|_|\\b)"
|
|
11
|
+
- special: "[(){}<>]|\\[|\\]"
|
|
12
|
+
- constant.string:
|
|
13
|
+
start: "\""
|
|
14
|
+
end: "\""
|
|
15
|
+
skip: "\\\\."
|
|
16
|
+
rules:
|
|
17
|
+
- constant.specialChar: "\\\\."
|
|
18
|
+
- comment:
|
|
19
|
+
start: "%\\{"
|
|
20
|
+
end: "%\\}"
|
|
21
|
+
rules: []
|
|
22
|
+
- comment:
|
|
23
|
+
start: "%"
|
|
24
|
+
end: "$"
|
|
25
|
+
rules: []
|
|
26
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
filetype: lisp
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(emacs|zile)$|\\.(el|li?sp|scm|ss|rkt)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- default: "\\([a-z-]+"
|
|
8
|
+
- symbol: "\\(([\\-+*/<>]|<=|>=)|'"
|
|
9
|
+
- constant.number: "\\b[0-9]+b>"
|
|
10
|
+
- special: "\\bnil\\b"
|
|
11
|
+
- preproc: "\\b[tT]b>"
|
|
12
|
+
- constant.string: "\\\"(\\\\.|[^\"])*\\\""
|
|
13
|
+
- constant.specialChar: "'[A-Za-z][A-Za-z0-9_-]+"
|
|
14
|
+
- constant.specialChar: "\\\\.?"
|
|
15
|
+
- comment: "(^|[[:space:]]);.*"
|
|
16
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
17
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
filetype: log
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.log|log\\.txt)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- diff-modified: "\\b(WARN(ING)?|[Ww]arn(ing)?|w(r)?n|w|W/)\\b"
|
|
8
|
+
- diff-modified: "\\b(CRITICAL|[Cc]ritical)\\b"
|
|
9
|
+
|
|
10
|
+
- constant: "\\b(INFO(RMATION)?|[Ii]nfo(rmation)?|[Ii]n(f)?|i|I/)\\b"
|
|
11
|
+
- constant: "\\b(DEBUG|[Dd]ebug|dbug|dbg|de|d|D/)\\b"
|
|
12
|
+
- constant: "\\b(VERBOSE|[Vv]erbose|V/)\\b"
|
|
13
|
+
- constant: "\\b(ALERT|[Aa]lert)\\b"
|
|
14
|
+
|
|
15
|
+
- preproc: "\\b(TRACE|Trace|NOTICE|VERBOSE|verb|vrb|vb|v)\\b"
|
|
16
|
+
|
|
17
|
+
- gutter-error: "\\b(ERROR|[Ee]rr(or)?|[Ee]r(or)?|e|E\\x2F)\\b"
|
|
18
|
+
- gutter-error: "\\b(FATAL|[Ff]atal)\\b"
|
|
19
|
+
- gutter-error: "\\b(EMERGENCY|[Ee]mergency)\\b"
|
|
20
|
+
- gutter-error: "\\b(FAIL(URE)?|[Ff]ail(ure)?)\\b"
|
|
21
|
+
|
|
22
|
+
# constants
|
|
23
|
+
- constant.bool.true: "\\b(YES|yes|Y|y|ON|on|TRUE|True|true)\\b"
|
|
24
|
+
- constant.bool.false: "\\b(NO|no|N|n|OFF|off|FALSE|False|false)\\b"
|
|
25
|
+
- constant.bool.false: "\\b(None|null|nil)\\b"
|
|
26
|
+
|
|
27
|
+
# numbers
|
|
28
|
+
- constant.number: "\\b[0-9](_?[0-9])*(\\.([0-9](_?[0-9])*)?)?(e[0-9](_?[0-9])*)?\\b" # decimal
|
|
29
|
+
- constant.number: "\\b0b(_?[01])+\\b" # bin
|
|
30
|
+
- constant.number: "\\b0o(_?[0-7])+\\b" # oct
|
|
31
|
+
- constant.number: "\\b0x(_?[0-9a-f])+\\b" # hex
|
|
32
|
+
|
|
33
|
+
# operators
|
|
34
|
+
- symbol.operator: "([~^.:;,+*|=!\\%]|<|>|/|-|&)"
|
|
35
|
+
|
|
36
|
+
# parentheses
|
|
37
|
+
- symbol.brackets: "([(){}]|\\[|\\])"
|
|
38
|
+
|
|
39
|
+
# string
|
|
40
|
+
- constant.string:
|
|
41
|
+
start: "\""
|
|
42
|
+
end: "(\"|$)"
|
|
43
|
+
skip: "\\\\."
|
|
44
|
+
rules:
|
|
45
|
+
- constant.specialChar: "\\\\."
|
|
46
|
+
|
|
47
|
+
- constant.string:
|
|
48
|
+
start: "'"
|
|
49
|
+
end: "('|$)"
|
|
50
|
+
skip: "\\\\."
|
|
51
|
+
rules:
|
|
52
|
+
- constant.specialChar: "\\\\."
|
|
53
|
+
|
|
54
|
+
# file
|
|
55
|
+
- preproc: "\\b(FILE|File|file)\\b"
|
|
56
|
+
|
|
57
|
+
# time
|
|
58
|
+
- identifier: "\\b((([Mm]on|[Tt]ues|[Ww]ed(nes)?|[Tt]hur(s)?|[Ff]ri|[Ss]at(ur)?|[Ss]un)(day)?\\s)?([Jj]an(uary)?|[Ff]eb(ruary)?|[Mm]ar(ch)?|[Aa]pr(il)?|[Mm]ay|[Jj]un(e)?|[Jj]ul(y)?|[Aa]ug(ust)?|[Aa]go|[Ss]ep(tember)?|[Oo]ct(ober)?|[Nn]ov(ember)?|[Dd]ec(ember)?)\\s\\d{1,2},?(\\s\\d{4})?)\\b" # date
|
|
59
|
+
- identifier: "\\b(\\d{2,4}[-/\\.]?\\d{2,3}[-/\\.]?\\d{2,4})\\b" # date
|
|
60
|
+
- identifier: "\\b(\\d{2}:\\d{2}(:\\d{2})?([\\.,]?\\d{1,8}[\\.\\+,]?\\d{1,8}?)?([\\.\\+,]?\\d{1,8}[\\.\\+,]?\\d{1,8}?)?([\\.\\+,]?\\d{1,8}?)?(\\s-\\d{0,4})?)\\b" # time
|
|
61
|
+
- identifier: "^([0-2][0-9][0-2][0-9][-/]?[0-9][0-9][-/]?[0-9][0-9])"
|
|
62
|
+
# - identifier: "^([0-2][0-9][0-2][0-9][-/]?[0-9][0-9][-/]?[0-9][0-9]\\s[0-9][0-9]:[0-9][0-9](:[0-9][0-9])?(\\.?[0-9][0-9][0-9])?)"
|
|
63
|
+
- identifier: "^(\\d{4}[-/]?\\d{2}[-/]?\\d{2}\\s\\d{2}:\\d{2}(:\\d{2})?(\\.?\\d{2,8})?)"
|
|
64
|
+
- identifier: "^([0-2][0-9]|[0-2]-?[0-9][0-9]-?[0-9][0-9])\\-([0-1][0-9])\\-([0-3][0-9]) ([0-2][0-9])\\:([0-5][0-9])\\:([0-5][0-9]),([0-9][0-9][0-9])"
|
|
65
|
+
# Complete precision:
|
|
66
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))"
|
|
67
|
+
# No milliseconds:
|
|
68
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))"
|
|
69
|
+
# No Seconds:
|
|
70
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))"
|
|
71
|
+
# Putting it all together:
|
|
72
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))"
|
|
73
|
+
# Complete precision:
|
|
74
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+)"
|
|
75
|
+
# No milliseconds
|
|
76
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d)"
|
|
77
|
+
# No Seconds
|
|
78
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d)"
|
|
79
|
+
# Putting it all together
|
|
80
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+)|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d)|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d)"
|
|
81
|
+
|
|
82
|
+
# link
|
|
83
|
+
- constant.string.url:
|
|
84
|
+
start: "https?://"
|
|
85
|
+
end: "\\s"
|
|
86
|
+
rules: []
|
|
87
|
+
|
|
88
|
+
# path
|
|
89
|
+
# - constant.string.url: "\\b(.+)/([^/]+)\\b" # linux
|
|
90
|
+
# - constant.string.url: "\\b(^[a-zA-Z]:)\\b" # windowns
|
|
91
|
+
|
|
92
|
+
- diff-modified: "([Cc]ommit:)\\s\\w+\\[\\w+]"
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
filetype: lua
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.lua$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(do|end|while|break|repeat|until|if|elseif|then|else|for|in|function|local|return|goto)\\b"
|
|
8
|
+
- statement: "\\b(not|and|or)\\b"
|
|
9
|
+
- statement: "\\b(debug|string|math|table|io|coroutine|os|utf8|bit32)\\b\\."
|
|
10
|
+
- statement: "\\b(_ENV|_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\\s*\\("
|
|
11
|
+
- identifier: "io\\.\\b(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)\\b"
|
|
12
|
+
- identifier: "math\\.\\b(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|maxinteger|min|mininteger|modf|pi|pow|rad|random|randomseed|sin|sqrt|tan|tointeger|type|ult)\\b"
|
|
13
|
+
- identifier: "os\\.\\b(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\\b"
|
|
14
|
+
- identifier: "package\\.\\b(config|cpath|loaded|loadlib|path|preload|seeall|searchers|searchpath)\\b"
|
|
15
|
+
- identifier: "string\\.\\b(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)\\b"
|
|
16
|
+
- identifier: "table\\.\\b(concat|insert|maxn|move|pack|remove|sort|unpack)\\b"
|
|
17
|
+
- identifier: "utf8\\.\\b(char|charpattern|codes|codepoint|len|offset)\\b"
|
|
18
|
+
- identifier: "coroutine\\.\\b(create|isyieldable|resume|running|status|wrap|yield)\\b"
|
|
19
|
+
- identifier: "debug\\.\\b(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|getuservalue|setfenv|sethook|setlocal|setmetatable|setupvalue|setuservalue|traceback|upvalueid|upvaluejoin)\\b"
|
|
20
|
+
- identifier: "bit32\\.\\b(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)\\b"
|
|
21
|
+
- identifier: "\\:\\b(close|flush|lines|read|seek|setvbuf|write|byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)\\b"
|
|
22
|
+
- identifier: "\\b(self|arg)\\b"
|
|
23
|
+
- constant: "\\b(false|nil|true)\\b"
|
|
24
|
+
- statement: "(\\b(dofile|require|include)|%q|%!|%Q|%r|%x)\\b"
|
|
25
|
+
|
|
26
|
+
- symbol.brackets: "[(){}\\[\\]]"
|
|
27
|
+
- symbol: "(\\*|//|/|%|\\+|-|\\^|>|>=|<|<=|~=|=|[\\.]{2,3}|#)"
|
|
28
|
+
|
|
29
|
+
- constant.number: "\\b((0[xX](([0-9A-Fa-f]+\\.[0-9A-Fa-f]*)|(\\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)|((([0-9]+\\.[0-9]*)|(\\.?[0-9]+))([eE][-+]?[0-9]+)?))"
|
|
30
|
+
|
|
31
|
+
- constant.string:
|
|
32
|
+
start: "\""
|
|
33
|
+
end: "\""
|
|
34
|
+
skip: "\\\\."
|
|
35
|
+
rules:
|
|
36
|
+
- constant.specialChar: "\\\\([abfnrtvz\\'\"]|[0-9]{1,3}|x[0-9a-fA-F][0-9a-fA-F]|u\\{[0-9a-fA-F]+\\})"
|
|
37
|
+
|
|
38
|
+
- constant.string:
|
|
39
|
+
start: "'"
|
|
40
|
+
end: "'"
|
|
41
|
+
skip: "\\\\."
|
|
42
|
+
rules:
|
|
43
|
+
- constant.specialChar: "\\\\([abfnrtvz\\'\"]|[0-9]{1,3}|x[0-9a-fA-F][0-9a-fA-F]|u\\{[0-9a-fA-F]+\\})"
|
|
44
|
+
|
|
45
|
+
- constant.string:
|
|
46
|
+
start: "\\[\\["
|
|
47
|
+
end: "\\]\\]"
|
|
48
|
+
rules: []
|
|
49
|
+
|
|
50
|
+
# support first few lengths of "long brackets" explicitly
|
|
51
|
+
# brackets longer than that will give false positives
|
|
52
|
+
|
|
53
|
+
- constant.string:
|
|
54
|
+
start: "\\[=\\["
|
|
55
|
+
end: "\\]=\\]"
|
|
56
|
+
rules: []
|
|
57
|
+
|
|
58
|
+
- constant.string:
|
|
59
|
+
start: "\\[==\\["
|
|
60
|
+
end: "\\]==\\]"
|
|
61
|
+
rules: []
|
|
62
|
+
|
|
63
|
+
- constant.string:
|
|
64
|
+
start: "\\[===\\["
|
|
65
|
+
end: "\\]===\\]"
|
|
66
|
+
rules: []
|
|
67
|
+
|
|
68
|
+
- constant.string:
|
|
69
|
+
start: "\\[====+\\["
|
|
70
|
+
end: "\\]====+\\]"
|
|
71
|
+
rules: []
|
|
72
|
+
|
|
73
|
+
- comment.block:
|
|
74
|
+
start: "\\-\\-\\[\\["
|
|
75
|
+
end: "\\]\\]"
|
|
76
|
+
rules:
|
|
77
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
78
|
+
|
|
79
|
+
# support long brackets, same as with multiline strings
|
|
80
|
+
|
|
81
|
+
- comment.block:
|
|
82
|
+
start: "\\-\\-\\[=\\["
|
|
83
|
+
end: "\\]=\\]"
|
|
84
|
+
rules:
|
|
85
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
86
|
+
|
|
87
|
+
- comment.block:
|
|
88
|
+
start: "\\-\\-\\[==\\["
|
|
89
|
+
end: "\\]==\\]"
|
|
90
|
+
rules:
|
|
91
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
92
|
+
|
|
93
|
+
- comment.block:
|
|
94
|
+
start: "\\-\\-\\[===\\["
|
|
95
|
+
end: "\\]===\\]"
|
|
96
|
+
rules:
|
|
97
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
98
|
+
|
|
99
|
+
- comment.block:
|
|
100
|
+
start: "\\-\\-\\[====+\\["
|
|
101
|
+
end: "\\]====+\\]"
|
|
102
|
+
rules:
|
|
103
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
104
|
+
|
|
105
|
+
# this has to go after block comment or block comment does not work
|
|
106
|
+
|
|
107
|
+
- comment:
|
|
108
|
+
start: "\\-\\-"
|
|
109
|
+
end: "$"
|
|
110
|
+
rules:
|
|
111
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
filetype: mail
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(.*/mutt-.*|\\.eml)$"
|
|
5
|
+
header: "^From .* \\d+:\\d+:\\d+ \\d+"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- type: "^From .*"
|
|
9
|
+
- identifier: "^[^[:space:]]+:"
|
|
10
|
+
- preproc: "^List-(Id|Archive|Subscribe|Unsubscribe|Post|Help):"
|
|
11
|
+
- constant: "^(To|From):"
|
|
12
|
+
- constant.string:
|
|
13
|
+
start: "^Subject:.*"
|
|
14
|
+
end: "$"
|
|
15
|
+
rules:
|
|
16
|
+
- constant.specialChar: "\\\\."
|
|
17
|
+
- statement: "<?[^@[:space:]]+@[^[:space:]]+>?"
|
|
18
|
+
- default:
|
|
19
|
+
start: "^\\n\\n"
|
|
20
|
+
end: ".*"
|
|
21
|
+
rules: []
|
|
22
|
+
- comment:
|
|
23
|
+
start: "^>.*"
|
|
24
|
+
end: "$"
|
|
25
|
+
rules: []
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
filetype: makefile
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "([Mm]akefile|\\.ma?k)$"
|
|
5
|
+
header: "^#!.*/(env +)?[bg]?make( |$)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>"
|
|
9
|
+
- statement: "^(export|include|override)\\>"
|
|
10
|
+
- symbol.operator: "^[^:= ]+:"
|
|
11
|
+
- symbol.operator: "([=,%]|\\+=|\\?=|:=|&&|\\|\\|)"
|
|
12
|
+
- statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
|
|
13
|
+
- statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
|
|
14
|
+
- statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
|
|
15
|
+
- statement: "\\$\\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]"
|
|
16
|
+
- statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
|
|
17
|
+
- identifier: "^.+:"
|
|
18
|
+
- identifier: "[()$]"
|
|
19
|
+
- constant.string:
|
|
20
|
+
start: "\""
|
|
21
|
+
end: "\""
|
|
22
|
+
skip: "\\\\."
|
|
23
|
+
rules:
|
|
24
|
+
- constant.specialChar: "\\\\."
|
|
25
|
+
- constant.string:
|
|
26
|
+
start: "'"
|
|
27
|
+
end: "'"
|
|
28
|
+
skip: "\\\\."
|
|
29
|
+
rules:
|
|
30
|
+
- constant.specialChar: "\\\\."
|
|
31
|
+
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
|
|
32
|
+
- identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)"
|
|
33
|
+
- identifier: "\\$\\$|\\\\.?"
|
|
34
|
+
- comment:
|
|
35
|
+
start: "#"
|
|
36
|
+
end: "$"
|
|
37
|
+
rules: []
|
|
38
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
filetype: man
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.[1-9]x?$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- green: "\\.(S|T)H.*$"
|
|
8
|
+
- brightgreen: "\\.(S|T)H|\\.TP"
|
|
9
|
+
- brightred: "\\.(BR?|I[PR]?).*$"
|
|
10
|
+
- brightblue: "\\.(BR?|I[PR]?|PP)"
|
|
11
|
+
- brightwhite: "\\\\f[BIPR]"
|
|
12
|
+
- yellow: "\\.(br|DS|RS|RE|PD)"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
filetype: markdown
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(livemd|md|mkd|mkdn|markdown)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Tables (Github extension)
|
|
8
|
+
- type: ".*[ :]\\|[ :].*"
|
|
9
|
+
|
|
10
|
+
# quotes
|
|
11
|
+
- statement: "^>.*"
|
|
12
|
+
|
|
13
|
+
# Emphasis
|
|
14
|
+
- type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)"
|
|
15
|
+
|
|
16
|
+
# Strong emphasis
|
|
17
|
+
- type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)"
|
|
18
|
+
|
|
19
|
+
# strike-through
|
|
20
|
+
- type: "(^|[[:space:]])~~[^ ][^~]*~~"
|
|
21
|
+
|
|
22
|
+
# horizontal rules
|
|
23
|
+
- special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$"
|
|
24
|
+
|
|
25
|
+
# headlines
|
|
26
|
+
- special: "^#{1,6}.*"
|
|
27
|
+
|
|
28
|
+
# lists
|
|
29
|
+
- identifier: "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. "
|
|
30
|
+
|
|
31
|
+
# misc
|
|
32
|
+
- preproc: "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))"
|
|
33
|
+
|
|
34
|
+
# links
|
|
35
|
+
- constant: "\\[[^]]+\\]"
|
|
36
|
+
- constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)"
|
|
37
|
+
|
|
38
|
+
# images
|
|
39
|
+
- underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])"
|
|
40
|
+
|
|
41
|
+
# urls
|
|
42
|
+
- underlined: "https?://[^ )>]+"
|
|
43
|
+
|
|
44
|
+
- special: "^```$"
|
|
45
|
+
|
|
46
|
+
- special:
|
|
47
|
+
start: "`"
|
|
48
|
+
end: "`"
|
|
49
|
+
rules: []
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# sendmail config files
|
|
2
|
+
|
|
3
|
+
filetype: mc
|
|
4
|
+
|
|
5
|
+
detect:
|
|
6
|
+
filename: "\\.mc$"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
- statement: "^(divert|VERSIONID|OSTYPE|DOMAIN|FEATURE|define)"
|
|
10
|
+
- statement: "^(DAEMON_OPTIONS|MAILER)"
|
|
11
|
+
- comment:
|
|
12
|
+
start: "#"
|
|
13
|
+
end: "$"
|
|
14
|
+
rules: []
|
|
15
|
+
- comment:
|
|
16
|
+
start: "dnl"
|
|
17
|
+
end: "$"
|
|
18
|
+
rules: []
|
|
19
|
+
- constant.string:
|
|
20
|
+
start: "`"
|
|
21
|
+
end: "'"
|
|
22
|
+
rules: []
|
|
23
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
filetype: meson
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(meson\\.build|meson_options\\.txt|meson\\.options)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
|
|
8
|
+
# refer to https://mesonbuild.com/Syntax.html
|
|
9
|
+
|
|
10
|
+
- statement: "\\b(elif|else|if|endif)\\b"
|
|
11
|
+
- statement: "\\b(foreach|endforeach)\\b"
|
|
12
|
+
- statement: "\\b(continue|break)\\b"
|
|
13
|
+
- statement: "\\b(and|not|or|in)\\b"
|
|
14
|
+
|
|
15
|
+
- symbol.operator: "[<>?:+*/-]|[+!<>=]?="
|
|
16
|
+
- symbol.brackets: "[(){}\\[\\]]"
|
|
17
|
+
|
|
18
|
+
- constant.number: "\\b(0|[1-9][0-9]*)\\b" # decimal
|
|
19
|
+
- constant.number: "\\b(0b[01]+)\\b" # bin
|
|
20
|
+
- constant.number: "\\b(0o[0-7]+)\\b" # oct
|
|
21
|
+
- constant.number: "\\b(0x[0-9a-fA-F]+)\\b" # hex
|
|
22
|
+
|
|
23
|
+
# meson builtins
|
|
24
|
+
- identifier: "\\b(add_global_arguments|add_global_link_arguments|add_languages|add_project_arguments|add_project_dependencies)\\b"
|
|
25
|
+
- identifier: "\\b(add_project_link_arguments|add_test_setup|alias_target|assert|benchmark|both_libraries|build_machine|build_target|configuration_data)\\b"
|
|
26
|
+
- identifier: "\\b(configure_file|custom_target|debug|declare_dependency|dependency|disabler|environment|error|executable|files)\\b"
|
|
27
|
+
- identifier: "\\b(find_program|generator|get_option|get_variable|host_machine|import|include_directories|install_data|install_emptydir)\\b"
|
|
28
|
+
- identifier: "\\b(install_headers|install_man|install_subdir|install_symlink|is_disabler|is_variable|jar|join_paths|library|meson)\\b"
|
|
29
|
+
- identifier: "\\b(message|option|project|range|run_command|run_target|set_variable|shared_library|shared_module|static_library)\\b"
|
|
30
|
+
- identifier: "\\b(structured_sources|subdir|subdir_done|subproject|summary|target_machine|test|unset_variable|vcs_tag|warning)\\b"
|
|
31
|
+
|
|
32
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
33
|
+
|
|
34
|
+
- comment:
|
|
35
|
+
start: "#"
|
|
36
|
+
end: "$"
|
|
37
|
+
rules: []
|
|
38
|
+
|
|
39
|
+
# multiline strings do not support escape sequences
|
|
40
|
+
- constant.string:
|
|
41
|
+
start: "'''"
|
|
42
|
+
end: "'''"
|
|
43
|
+
rules: []
|
|
44
|
+
|
|
45
|
+
- constant.string:
|
|
46
|
+
start: "'"
|
|
47
|
+
end: "'"
|
|
48
|
+
skip: "\\\\."
|
|
49
|
+
rules:
|
|
50
|
+
- constant.specialChar: "\\\\[abfnrtv\\\\']"
|
|
51
|
+
- constant.specialChar: "\\\\([0-7]{1,3}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|N\\{[^\\}]+\\})"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
filetype: micro
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(micro)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(syntax|color(-link)?)\\b"
|
|
8
|
+
- statement: "\\b(start=|end=)\\b"
|
|
9
|
+
# Simple one-liners
|
|
10
|
+
- identifier: "\\b(default|number|statement|underlined|error|todo|statusline|indent-char|cursor\\-line|color\\-column|ignore|divider|tabbar)\\b"
|
|
11
|
+
# Separate identifiers to keep "complex" regex clean
|
|
12
|
+
- identifier: "\\b(special(Char)?)\\b"
|
|
13
|
+
- identifier: "\\b((current\\-)?line\\-number)\\b"
|
|
14
|
+
- identifier: "\\b(gutter\\-(info|error|warning){1})\\b"
|
|
15
|
+
- identifier: "\\b(comment(\\.bright)?)\\b"
|
|
16
|
+
- identifier: "\\b(symbol(\\.(brackets|operator|tag))?)\\b"
|
|
17
|
+
- identifier: "\\b(identifier(\\.(class|macro|var))?)\\b"
|
|
18
|
+
- identifier: "\\b(constant(\\.(bool(\\.(true|false){1})?|number|specialChar|string(\\.url)?){1})?)\\b"
|
|
19
|
+
- identifier: "\\b(preproc(\\.shebang)?)\\b"
|
|
20
|
+
- identifier: "\\b(type(\\.keyword)?)\\b"
|
|
21
|
+
- constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b"
|
|
22
|
+
- constant.number: "\\b0x[0-9 a-f A-F]+\\b"
|
|
23
|
+
- comment:
|
|
24
|
+
start: "#"
|
|
25
|
+
end: "$"
|
|
26
|
+
rules:
|
|
27
|
+
- todo: "(FIXME|TODO|NOTE):?"
|
|
28
|
+
- constant.string:
|
|
29
|
+
start: "\""
|
|
30
|
+
end: "\""
|
|
31
|
+
skip: "\\\\."
|
|
32
|
+
rules:
|
|
33
|
+
- constant.specialChar: "\\\\."
|
|
34
|
+
- constant.number: "#[0-9 A-F a-f]+"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
filetype: mpd
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "mpd\\.conf$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(user|group|bind_to_address|host|port|plugin|name|type)\\b"
|
|
8
|
+
- statement: "\\b((music|playlist)_directory|(db|log|state|pid|sticker)_file)\\b"
|
|
9
|
+
- special: "^(input|audio_output|decoder)[[:space:]]*\\{|\\}"
|
|
10
|
+
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
11
|
+
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
12
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
13
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
filetype: nanorc
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.?nanorc$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- default: "(?i)^[[:space:]]*((un)?set|include|syntax|i?color).*$"
|
|
8
|
+
- type: "(?i)^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|preserve|punct)\\>|^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|undo|view|whitespace|wordbounds)\\b"
|
|
9
|
+
- preproc: "(?i)^[[:space:]]*(set|unset|include|syntax|header)\\b"
|
|
10
|
+
- constant.bool.true: "(?i)(set)\\b"
|
|
11
|
+
- constant.bool.false: "(?i)(unset)\\b"
|
|
12
|
+
- identifier: "(?i)^[[:space:]]*(i)?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\\b"
|
|
13
|
+
- special: "(?i)^[[:space:]]*(i)?color\\b|\\b(start|end)="
|
|
14
|
+
- constant.string: "\"(\\\\.|[^\"])*\""
|
|
15
|
+
- comment: "^[[:space:]]*#.*$"
|
|
16
|
+
- comment.bright: "^[[:space:]]*##.*$"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
filetype: nftables
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(nftables\\.(conf|rules)$|nftables(\\.rules)?\\.d/)"
|
|
5
|
+
header: "^(#!.*/(env +)?nft( |$)|flush +ruleset)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- type: "\\b(chain|counter|map|rule|ruleset|set|table)\\b"
|
|
9
|
+
- type: "\\b(ether|inet|i(cm)?p(x|(v?(4|6))?)|tcp|udp|8021q)\\b"
|
|
10
|
+
- special: "\\b(element(s)?|hook|policy|priority|type|state)\\b"
|
|
11
|
+
- identifier: "\\b(ct|iif|iifname|meta|oif|oifname|th|dport|sport|saddr|daddr|l4proto)\\b"
|
|
12
|
+
- statement: "\\b(accept|drop|goto|jump|log|masquerade|reject|limit|queue)\\b"
|
|
13
|
+
- preproc: "\\b(add|define|flush|include|delete)\\b"
|
|
14
|
+
- symbol.operator: "[<>.&|^!=:;,@]|\\b(and|ge|gt|le|lt|or|xor)\\b"
|
|
15
|
+
- constant.string:
|
|
16
|
+
start: "\""
|
|
17
|
+
end: "\""
|
|
18
|
+
rules: []
|
|
19
|
+
# Integer Constants
|
|
20
|
+
- constant.number: "\\b([0-9]+)\\b"
|
|
21
|
+
- constant.number: "\\b(0x[0-9a-fA-F]+)\\b"
|
|
22
|
+
- identifier.var: "[$@][a-zA-Z_.][a-zA-Z0-9_/.-]*"
|
|
23
|
+
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
24
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
25
|
+
- indent-char: " + +| + +"
|
|
26
|
+
- comment:
|
|
27
|
+
start: "#"
|
|
28
|
+
end: "$"
|
|
29
|
+
rules:
|
|
30
|
+
- todo: "(TODO|FIXME):?"
|