on master help sign in
Merge branch 'master' into cursor-shape-new
b3b4e78Gokul Soumya
.gitmodules+9−1
@@ -177,7 +177,7 @@
177[submodule "helix-syntax/languages/tree-sitter-llvm-mir"]
177[submodule "helix-syntax/languages/tree-sitter-llvm-mir"]
178 path = helix-syntax/languages/tree-sitter-llvm-mir
178 path = helix-syntax/languages/tree-sitter-llvm-mir
179 url = https://github.com/Flakebi/tree-sitter-llvm-mir.git
179 url = https://github.com/Flakebi/tree-sitter-llvm-mir.git
180− shallow = true
180+ shallow = true
181[submodule "helix-syntax/languages/tree-sitter-git-diff"]
181[submodule "helix-syntax/languages/tree-sitter-git-diff"]
182 path = helix-syntax/languages/tree-sitter-git-diff
182 path = helix-syntax/languages/tree-sitter-git-diff
183 url = https://github.com/the-mikedavis/tree-sitter-git-diff.git
183 url = https://github.com/the-mikedavis/tree-sitter-git-diff.git
@@ -190,3 +190,11 @@
190 path = helix-syntax/languages/tree-sitter-git-rebase
190 path = helix-syntax/languages/tree-sitter-git-rebase
191 url = https://github.com/the-mikedavis/tree-sitter-git-rebase.git
191 url = https://github.com/the-mikedavis/tree-sitter-git-rebase.git
192 shallow = true
192 shallow = true
193+[submodule "helix-syntax/languages/tree-sitter-regex"]
194+ path = helix-syntax/languages/tree-sitter-regex
195+ url = https://github.com/tree-sitter/tree-sitter-regex.git
196+ shallow = true
197+[submodule "helix-syntax/languages/tree-sitter-make"]
198+ path = helix-syntax/languages/tree-sitter-make
199+ url = https://github.com/alemuller/tree-sitter-make
200+ shallow = true
book/src/configuration.md+1−1
@@ -58,7 +58,7 @@ of the terminal environment, only the primary cursor can change shape.
58[insert mode]: ./keymap.md#insert-mode
58[insert mode]: ./keymap.md#insert-mode
59[select mode]: ./keymap.md#select--extend-mode
59[select mode]: ./keymap.md#select--extend-mode
60
60
61−### `[editor.filepicker]` Section
61+### `[editor.file-picker]` Section
62
62
63Sets options for file picker and global search. All but the last key listed in
63Sets options for file picker and global search. All but the last key listed in
64the default file-picker configuration below are IgnoreOptions: whether hidden
64the default file-picker configuration below are IgnoreOptions: whether hidden
book/src/generated/lang-support.md+3−1
@@ -18,7 +18,7 @@
18| go | ✓ | ✓ | ✓ | `gopls` |
18| go | ✓ | ✓ | ✓ | `gopls` |
19| html | ✓ | | | |
19| html | ✓ | | | |
20| java | ✓ | | | |
20| java | ✓ | | | |
21−| javascript | ✓ | | ✓ | |
21+| javascript | ✓ | | ✓ | `typescript-language-server` |
22| json | ✓ | | ✓ | |
22| json | ✓ | | ✓ | |
23| julia | ✓ | | | `julia` |
23| julia | ✓ | | | `julia` |
24| latex | ✓ | | | |
24| latex | ✓ | | | |
@@ -27,6 +27,7 @@
27| llvm-mir | ✓ | ✓ | ✓ | |
27| llvm-mir | ✓ | ✓ | ✓ | |
28| llvm-mir-yaml | ✓ | | ✓ | |
28| llvm-mir-yaml | ✓ | | ✓ | |
29| lua | ✓ | | ✓ | |
29| lua | ✓ | | ✓ | |
30+| make | ✓ | | | |
30| markdown | ✓ | | | |
31| markdown | ✓ | | | |
31| mint | | | | `mint` |
32| mint | | | | `mint` |
32| nix | ✓ | | ✓ | `rnix-lsp` |
33| nix | ✓ | | ✓ | `rnix-lsp` |
@@ -38,6 +39,7 @@
38| protobuf | ✓ | | ✓ | |
39| protobuf | ✓ | | ✓ | |
39| python | ✓ | ✓ | ✓ | `pylsp` |
40| python | ✓ | ✓ | ✓ | `pylsp` |
40| racket | | | | `racket` |
41| racket | | | | `racket` |
42+| regex | ✓ | | | |
41| ruby | ✓ | | ✓ | `solargraph` |
43| ruby | ✓ | | ✓ | `solargraph` |
42| rust | ✓ | ✓ | ✓ | `rust-analyzer` |
44| rust | ✓ | ✓ | ✓ | `rust-analyzer` |
43| scala | ✓ | | ✓ | `metals` |
45| scala | ✓ | | ✓ | `metals` |
book/src/themes.md+9−7
@@ -1,14 +1,14 @@
1# Themes
1# Themes
2
2
3−First you'll need to place selected themes in your `themes` directory (i.e `~/.config/helix/themes`), the directory might have to be created beforehand.
3+To use a theme add `theme = "<name>"` to your [`config.toml`](./configuration.md) at the very top of the file before the first section or select it during runtime using `:theme <name>`.
4
4
5−To use a custom theme add `theme = <name>` to your [`config.toml`](./configuration.md) or override it during runtime using `:theme <name>`.
5+## Creating a theme
6
6
7−The default theme.toml can be found [here](https://github.com/helix-editor/helix/blob/master/theme.toml), and user submitted themes [here](https://github.com/helix-editor/helix/blob/master/runtime/themes).
7+Create a file with the name of your theme as file name (i.e `mytheme.toml`) and place it in your `themes` directory (i.e `~/.config/helix/themes`). The directory might have to be created beforehand.
8
8
9−## Creating a theme
9+The names "default" and "base16_default" are reserved for the builtin themes and cannot be overridden by user defined themes.
10
10
11−First create a file with the name of your theme as file name (i.e `mytheme.toml`) and place it in your `themes` directory (i.e `~/.config/helix/themes`).
11+The default theme.toml can be found [here](https://github.com/helix-editor/helix/blob/master/theme.toml), and user submitted themes [here](https://github.com/helix-editor/helix/blob/master/runtime/themes).
12
12
13Each line in the theme file is specified as below:
13Each line in the theme file is specified as below:
14
14
@@ -147,6 +147,7 @@ We use a similar set of scopes as
147 - `repeat` - `for`, `while`, `loop`
147 - `repeat` - `for`, `while`, `loop`
148 - `import` - `import`, `export`
148 - `import` - `import`, `export`
149 - `return`
149 - `return`
150+ - `exception`
150 - `operator` - `or`, `in`
151 - `operator` - `or`, `in`
151 - `directive` - Preprocessor directives (`#if` in C)
152 - `directive` - Preprocessor directives (`#if` in C)
152 - `function` - `fn`, `func`
153 - `function` - `fn`, `func`
@@ -171,8 +172,9 @@ We use a similar set of scopes as
171 - `bold`
172 - `bold`
172 - `italic`
173 - `italic`
173 - `link`
174 - `link`
174− - `url`
175+ - `url` - urls pointed to by links
175− - `label`
176+ - `label` - non-url link references
177+ - `text` - url and image descriptions in links
176 - `quote`
178 - `quote`
177 - `raw`
179 - `raw`
178 - `inline`
180 - `inline`
helix-core/src/object.rs+1−1
@@ -12,7 +12,7 @@ pub fn expand_selection(syntax: &Syntax, text: RopeSlice, selection: &Selection)
12 .root_node()
12 .root_node()
13 .descendant_for_byte_range(from, to)
13 .descendant_for_byte_range(from, to)
14 .and_then(|node| {
14 .and_then(|node| {
15− if node.child_count() == 0 || (node.start_byte() == from && node.end_byte() == to) {
15+ if node.start_byte() == from && node.end_byte() == to {
16 node.parent()
16 node.parent()
17 } else {
17 } else {
18 Some(node)
18 Some(node)
helix-syntax/build.rs−1
@@ -175,7 +175,6 @@ fn build_dir(dir: &str, language: &str) {
175fn main() {
175fn main() {
176 let ignore = vec![
176 let ignore = vec![
177 "tree-sitter-typescript".to_string(),
177 "tree-sitter-typescript".to_string(),
178− "tree-sitter-haskell".to_string(), // aarch64 failures: https://github.com/tree-sitter/tree-sitter-haskell/issues/34
179 "tree-sitter-ocaml".to_string(),
178 "tree-sitter-ocaml".to_string(),
180 ];
179 ];
181 let dirs = collect_tree_sitter_dirs(&ignore).unwrap();
180 let dirs = collect_tree_sitter_dirs(&ignore).unwrap();
helix-syntax/languages/tree-sitter-haskell+1−1

Submodule changed.

helix-syntax/languages/tree-sitter-makenew file+1

Submodule changed.

helix-syntax/languages/tree-sitter-regexnew file+1

Submodule changed.

helix-term/src/config.rs+28−23
@@ -20,14 +20,18 @@ pub struct LspConfig {
20 pub display_messages: bool,
20 pub display_messages: bool,
21}
21}
22
22
23+#[cfg(test)]
24+mod tests {
25+ use super::*;
26+
23−#[test]
27+ #[test]
24−fn parsing_keymaps_config_file() {
28+ fn parsing_keymaps_config_file() {
25− use crate::keymap;
29+ use crate::keymap;
26− use crate::keymap::Keymap;
30+ use crate::keymap::Keymap;
27− use helix_core::hashmap;
31+ use helix_core::hashmap;
28− use helix_view::document::Mode;
32+ use helix_view::document::Mode;
29−
33+
30− let sample_keymaps = r#"
34+ let sample_keymaps = r#"
31 [keys.insert]
35 [keys.insert]
32 y = "move_line_down"
36 y = "move_line_down"
33 S-C-a = "delete_selection"
37 S-C-a = "delete_selection"
@@ -36,19 +40,20 @@ fn parsing_keymaps_config_file() {
36 A-F12 = "move_next_word_end"
40 A-F12 = "move_next_word_end"
37 "#;
41 "#;
38
42
39− assert_eq!(
43+ assert_eq!(
40− toml::from_str::<Config>(sample_keymaps).unwrap(),
44+ toml::from_str::<Config>(sample_keymaps).unwrap(),
41− Config {
45+ Config {
42− keys: Keymaps(hashmap! {
46+ keys: Keymaps(hashmap! {
43− Mode::Insert => Keymap::new(keymap!({ "Insert mode"
47+ Mode::Insert => Keymap::new(keymap!({ "Insert mode"
44− "y" => move_line_down,
48+ "y" => move_line_down,
45− "S-C-a" => delete_selection,
49+ "S-C-a" => delete_selection,
46− })),
50+ })),
47− Mode::Normal => Keymap::new(keymap!({ "Normal mode"
51+ Mode::Normal => Keymap::new(keymap!({ "Normal mode"
48− "A-F12" => move_next_word_end,
52+ "A-F12" => move_next_word_end,
49− })),
53+ })),
50− }),
54+ }),
51− ..Default::default()
55+ ..Default::default()
52− }
56+ }
53− );
57+ );
58+ }
54}
59}
helix-view/src/theme.rs+45−40
@@ -296,53 +296,58 @@ impl TryFrom<Value> for ThemePalette {
296 }
296 }
297}
297}
298
298
299−#[test]
299+#[cfg(test)]
300−fn test_parse_style_string() {
300+mod tests {
301− let fg = Value::String("#ffffff".to_string());
301+ use super::*;
302
302
303− let mut style = Style::default();
303+ #[test]
304− let palette = ThemePalette::default();
304+ fn test_parse_style_string() {
305− palette.parse_style(&mut style, fg).unwrap();
305+ let fg = Value::String("#ffffff".to_string());
306
306
307− assert_eq!(style, Style::default().fg(Color::Rgb(255, 255, 255)));
307+ let mut style = Style::default();
308−}
308+ let palette = ThemePalette::default();
309+ palette.parse_style(&mut style, fg).unwrap();
309
310
310−#[test]
311+ assert_eq!(style, Style::default().fg(Color::Rgb(255, 255, 255)));
311−fn test_palette() {
312+ }
312− use helix_core::hashmap;
313− let fg = Value::String("my_color".to_string());
314
313
315− let mut style = Style::default();
314+ #[test]
316− let palette =
315+ fn test_palette() {
317− ThemePalette::new(hashmap! { "my_color".to_string() => Color::Rgb(255, 255, 255) });
316+ use helix_core::hashmap;
318− palette.parse_style(&mut style, fg).unwrap();
317+ let fg = Value::String("my_color".to_string());
319
318
320− assert_eq!(style, Style::default().fg(Color::Rgb(255, 255, 255)));
319+ let mut style = Style::default();
321−}
320+ let palette =
321+ ThemePalette::new(hashmap! { "my_color".to_string() => Color::Rgb(255, 255, 255) });
322+ palette.parse_style(&mut style, fg).unwrap();
322
323
323−#[test]
324+ assert_eq!(style, Style::default().fg(Color::Rgb(255, 255, 255)));
324−fn test_parse_style_table() {
325+ }
325− let table = toml::toml! {
326− "keyword" = {
327− fg = "#ffffff",
328− bg = "#000000",
329− modifiers = ["bold"],
330− }
331− };
332
326
327+ #[test]
328+ fn test_parse_style_table() {
329+ let table = toml::toml! {
330+ "keyword" = {
331+ fg = "#ffffff",
332+ bg = "#000000",
333+ modifiers = ["bold"],
334+ }
335+ };
336+
333− let mut style = Style::default();
337+ let mut style = Style::default();
334− let palette = ThemePalette::default();
338+ let palette = ThemePalette::default();
335− if let Value::Table(entries) = table {
339+ if let Value::Table(entries) = table {
336− for (_name, value) in entries {
340+ for (_name, value) in entries {
337− palette.parse_style(&mut style, value).unwrap();
341+ palette.parse_style(&mut style, value).unwrap();
342+ }
338 }
343 }
339− }
340
344
341− assert_eq!(
345+ assert_eq!(
342− style,
346+ style,
343− Style::default()
347+ Style::default()
344− .fg(Color::Rgb(255, 255, 255))
348+ .fg(Color::Rgb(255, 255, 255))
345− .bg(Color::Rgb(0, 0, 0))
349+ .bg(Color::Rgb(0, 0, 0))
346− .add_modifier(Modifier::BOLD)
350+ .add_modifier(Modifier::BOLD)
347− );
351+ );
352+ }
348}
353}
languages.toml+15
@@ -128,6 +128,7 @@ roots = []
128comment-token = "//"
128comment-token = "//"
129# TODO: highlights-jsx, highlights-params
129# TODO: highlights-jsx, highlights-params
130
130
131+language-server = { command = "typescript-language-server", args = ["--stdio"] }
131indent = { tab-width = 2, unit = " " }
132indent = { tab-width = 2, unit = " " }
132
133
133[[language]]
134[[language]]
@@ -389,6 +390,13 @@ indent = { tab-width = 2, unit = " " }
389language-server = { command = "cmake-language-server" }
390language-server = { command = "cmake-language-server" }
390injection-regex = "cmake"
391injection-regex = "cmake"
391
392
393+[[language]]
394+name = "make"
395+scope = "source.make"
396+file-types = ["Makefile", "makefile", "justfile", ".justfile"]
397+roots =[]
398+comment-token = "#"
399+
392[[language]]
400[[language]]
393name = "glsl"
401name = "glsl"
394scope = "source.glsl"
402scope = "source.glsl"
@@ -530,3 +538,10 @@ file-types = ["git-rebase-todo"]
530injection-regex = "git-rebase"
538injection-regex = "git-rebase"
531comment-token = "#"
539comment-token = "#"
532indent = { tab-width = 2, unit = " " }
540indent = { tab-width = 2, unit = " " }
541+
542+[[language]]
543+name = "regex"
544+scope = "source.regex"
545+injection-regex = "regex"
546+file-types = ["regex"]
547+roots = []
runtime/queries/elixir/injections.scm+7
@@ -1,2 +1,9 @@
1((comment) @injection.content
1((comment) @injection.content
2 (#set! injection.language "comment"))
2 (#set! injection.language "comment"))
3+
4+((sigil
5+ (sigil_name) @_sigil_name
6+ (quoted_content) @injection.content)
7+ (#match? @_sigil_name "^(r|R)$")
8+ (#set! injection.language "regex")
9+ (#set! injection.combined))
runtime/queries/haskell/highlights.scm+118−38
@@ -1,45 +1,125 @@
1−(variable) @variable
1+;; ----------------------------------------------------------------------------
2−(operator) @operator
2+;; Literals and comments
3−(exp_name (constructor) @constructor)
3+
4−(constructor_operator) @operator
5−(module) @namespace
6−(type) @type
7−(type) @class
8−(constructor) @constructor
9−(pragma) @pragma
10−(comment) @comment
11−(signature name: (variable) @type)
12−(function name: (variable) @function)
13−(constraint class: (class_name (type)) @class)
14−(class (class_head class: (class_name (type)) @class))
15−(instance (instance_head class: (class_name (type)) @class))
16(integer) @constant.numeric.integer
4(integer) @constant.numeric.integer
5+(exp_negation) @constant.numeric.integer
17(exp_literal (float)) @constant.numeric.float
6(exp_literal (float)) @constant.numeric.float
18(char) @constant.character
7(char) @constant.character
19−(con_unit) @literal
8+(string) @string
20−(con_list) @literal
9+
21−(tycon_arrow) @operator
10+(con_unit) @constant.builtin ; unit, as in ()
22−(where) @keyword
11+
23−"module" @keyword
12+(comment) @comment
24−"let" @keyword
13+
25−"in" @keyword
14+
26−"class" @keyword
15+;; ----------------------------------------------------------------------------
27−"instance" @keyword
16+;; Punctuation
28−"data" @keyword
17+
29−"newtype" @keyword
30−"family" @keyword
31−"type" @keyword
32−"import" @keyword
33−"qualified" @keyword
34−"as" @keyword
35−"deriving" @keyword
36−"via" @keyword
37−"stock" @keyword
38−"anyclass" @keyword
39−"do" @keyword
40−"mdo" @keyword
41−"rec" @keyword
42[
18[
43 "("
19 "("
44 ")"
20 ")"
21+ "{"
22+ "}"
23+ "["
24+ "]"
45] @punctuation.bracket
25] @punctuation.bracket
26+
27+[
28+ (comma)
29+ ";"
30+] @punctuation.delimiter
31+
32+
33+;; ----------------------------------------------------------------------------
34+;; Keywords, operators, includes
35+
36+(pragma) @constant.macro
37+
38+[
39+ "if"
40+ "then"
41+ "else"
42+ "case"
43+ "of"
44+] @keyword.control.conditional
45+
46+[
47+ "import"
48+ "qualified"
49+ "module"
50+] @keyword.control.import
51+
52+[
53+ (operator)
54+ (constructor_operator)
55+ (type_operator)
56+ (tycon_arrow)
57+ (qualified_module) ; grabs the `.` (dot), ex: import System.IO
58+ (all_names)
59+ (wildcard)
60+ "="
61+ "|"
62+ "::"
63+ "=>"
64+ "->"
65+ "<-"
66+ "\\"
67+ "`"
68+ "@"
69+] @operator
70+
71+(qualified_module (module) @constructor)
72+(qualified_type (module) @namespace)
73+(qualified_variable (module) @namespace)
74+(import (module) @namespace)
75+
76+[
77+ (where)
78+ "let"
79+ "in"
80+ "class"
81+ "instance"
82+ "data"
83+ "newtype"
84+ "family"
85+ "type"
86+ "as"
87+ "hiding"
88+ "deriving"
89+ "via"
90+ "stock"
91+ "anyclass"
92+ "do"
93+ "mdo"
94+ "rec"
95+ "forall"
96+ "∀"
97+ "infix"
98+ "infixl"
99+ "infixr"
100+] @keyword
101+
102+
103+;; ----------------------------------------------------------------------------
104+;; Functions and variables
105+
106+(signature name: (variable) @type)
107+(function name: (variable) @function)
108+
109+(variable) @variable
110+"_" @variable.builtin
111+
112+(exp_infix (variable) @operator) ; consider infix functions as operators
113+
114+("@" @namespace) ; "as" pattern operator, e.g. x@Constructor
115+
116+
117+;; ----------------------------------------------------------------------------
118+;; Types
119+
120+(type) @type
121+
122+(constructor) @constructor
123+
124+; True or False
125+((constructor) @_bool (#match? @_bool "(True|False)")) @constant.builtin.boolean
runtime/queries/make/highlights.scmnew file+170
@@ -0,0 +1,170 @@
1+[
2+ "("
3+ ")"
4+ "{"
5+ "}"
6+] @punctuation.bracket
7+
8+[
9+ ":"
10+ "&:"
11+ "::"
12+ "|"
13+ ";"
14+ "\""
15+ "'"
16+ ","
17+] @punctuation.delimiter
18+
19+[
20+ "$"
21+ "$$"
22+] @punctuation.special
23+
24+(automatic_variable
25+ [ "@" "%" "<" "?" "^" "+" "/" "*" "D" "F"] @punctuation.special)
26+
27+(automatic_variable
28+ "/" @error . ["D" "F"])
29+
30+[
31+ "="
32+ ":="
33+ "::="
34+ "?="
35+ "+="
36+ "!="
37+ "@"
38+ "-"
39+ "+"
40+] @operator
41+
42+[
43+ (text)
44+ (string)
45+ (raw_text)
46+] @string
47+
48+(variable_assignment (word) @string)
49+
50+[
51+ "ifeq"
52+ "ifneq"
53+ "ifdef"
54+ "ifndef"
55+ "else"
56+ "endif"
57+ "if"
58+ "or" ; boolean functions are conditional in make grammar
59+ "and"
60+] @keyword.control.conditional
61+
62+"foreach" @keyword.control.repeat
63+
64+[
65+ "define"
66+ "endef"
67+ "vpath"
68+ "undefine"
69+ "export"
70+ "unexport"
71+ "override"
72+ "private"
73+; "load"
74+] @keyword
75+
76+[
77+ "include"
78+ "sinclude"
79+ "-include"
80+] @keyword.control.import
81+
82+[
83+ "subst"
84+ "patsubst"
85+ "strip"
86+ "findstring"
87+ "filter"
88+ "filter-out"
89+ "sort"
90+ "word"
91+ "words"
92+ "wordlist"
93+ "firstword"
94+ "lastword"
95+ "dir"
96+ "notdir"
97+ "suffix"
98+ "basename"
99+ "addsuffix"
100+ "addprefix"
101+ "join"
102+ "wildcard"
103+ "realpath"
104+ "abspath"
105+ "call"
106+ "eval"
107+ "file"
108+ "value"
109+ "shell"
110+] @keyword.function
111+
112+[
113+ "error"
114+ "warning"
115+ "info"
116+] @keyword.control.exception
117+
118+;; Variable
119+(variable_assignment
120+ name: (word) @variable)
121+
122+(variable_reference
123+ (word) @variable)
124+
125+(comment) @comment
126+
127+((word) @clean @string.regexp
128+ (#match? @clean "[%\*\?]"))
129+
130+(function_call
131+ function: "error"
132+ (arguments (text) @error))
133+
134+(function_call
135+ function: "warning"
136+ (arguments (text) @warning))
137+
138+(function_call
139+ function: "info"
140+ (arguments (text) @info))
141+
142+;; Install Command Categories
143+;; Others special variables
144+;; Variables Used by Implicit Rules
145+[
146+ "VPATH"
147+ ".RECIPEPREFIX"
148+] @constant.builtin
149+
150+(variable_assignment
151+ name: (word) @clean @constant.builtin
152+ (#match? @clean "^(AR|AS|CC|CXX|CPP|FC|M2C|PC|CO|GET|LEX|YACC|LINT|MAKEINFO|TEX|TEXI2DVI|WEAVE|CWEAVE|TANGLE|CTANGLE|RM|ARFLAGS|ASFLAGS|CFLAGS|CXXFLAGS|COFLAGS|CPPFLAGS|FFLAGS|GFLAGS|LDFLAGS|LDLIBS|LFLAGS|YFLAGS|PFLAGS|RFLAGS|LINTFLAGS|PRE_INSTALL|POST_INSTALL|NORMAL_INSTALL|PRE_UNINSTALL|POST_UNINSTALL|NORMAL_UNINSTALL|MAKEFILE_LIST|MAKE_RESTARTS|MAKE_TERMOUT|MAKE_TERMERR|\.DEFAULT_GOAL|\.RECIPEPREFIX|\.EXTRA_PREREQS)$"))
153+
154+(variable_reference
155+ (word) @clean @constant.builtin
156+ (#match? @clean "^(AR|AS|CC|CXX|CPP|FC|M2C|PC|CO|GET|LEX|YACC|LINT|MAKEINFO|TEX|TEXI2DVI|WEAVE|CWEAVE|TANGLE|CTANGLE|RM|ARFLAGS|ASFLAGS|CFLAGS|CXXFLAGS|COFLAGS|CPPFLAGS|FFLAGS|GFLAGS|LDFLAGS|LDLIBS|LFLAGS|YFLAGS|PFLAGS|RFLAGS|LINTFLAGS|PRE_INSTALL|POST_INSTALL|NORMAL_INSTALL|PRE_UNINSTALL|POST_UNINSTALL|NORMAL_UNINSTALL|MAKEFILE_LIST|MAKE_RESTARTS|MAKE_TERMOUT|MAKE_TERMERR|\.DEFAULT_GOAL|\.RECIPEPREFIX|\.EXTRA_PREREQS\.VARIABLES|\.FEATURES|\.INCLUDE_DIRS|\.LOADED)$"))
157+
158+;; Standart targets
159+(targets
160+ (word) @constant.macro
161+ (#match? @constant.macro "^(all|install|install-html|install-dvi|install-pdf|install-ps|uninstall|install-strip|clean|distclean|mostlyclean|maintainer-clean|TAGS|info|dvi|html|pdf|ps|dist|check|installcheck|installdirs)$"))
162+
163+(targets
164+ (word) @constant.macro
165+ (#match? @constant.macro "^(all|install|install-html|install-dvi|install-pdf|install-ps|uninstall|install-strip|clean|distclean|mostlyclean|maintainer-clean|TAGS|info|dvi|html|pdf|ps|dist|check|installcheck|installdirs)$"))
166+
167+;; Builtin targets
168+(targets
169+ (word) @constant.macro
170+ (#match? @constant.macro "^\.(PHONY|SUFFIXES|DEFAULT|PRECIOUS|INTERMEDIATE|SECONDARY|SECONDEXPANSION|DELETE_ON_ERROR|IGNORE|LOW_RESOLUTION_TIME|SILENT|EXPORT_ALL_VARIABLES|NOTPARALLEL|ONESHELL|POSIX)$"))
runtime/queries/markdown/highlights.scm+5
@@ -21,6 +21,11 @@
21(link_destination) @markup.link.url
21(link_destination) @markup.link.url
22(link_label) @markup.link.label
22(link_label) @markup.link.label
23
23
24+[
25+ (link_text)
26+ (image_description)
27+] @markup.link.text
28+
24[
29[
25 (list_marker_plus)
30 (list_marker_plus)
26 (list_marker_minus)
31 (list_marker_minus)
runtime/queries/regex/highlights.scmnew file+53
@@ -0,0 +1,53 @@
1+; upstream: https://github.com/tree-sitter/tree-sitter-regex/blob/e1cfca3c79896ff79842f057ea13e529b66af636/queries/highlights.scm
2+
3+[
4+ "("
5+ ")"
6+ "(?"
7+ "(?:"
8+ "(?<"
9+ ">"
10+ "["
11+ "]"
12+ "{"
13+ "}"
14+] @punctuation.bracket
15+
16+[
17+ "*"
18+ "+"
19+ "|"
20+ "="
21+ "<="
22+ "!"
23+ "<!"
24+ "?"
25+] @operator
26+
27+[
28+ (identity_escape)
29+ (control_letter_escape)
30+ (character_class_escape)
31+ (control_escape)
32+ (start_assertion)
33+ (end_assertion)
34+ (boundary_assertion)
35+ (non_boundary_assertion)
36+] @constant.character.escape
37+
38+(group_name) @property
39+
40+(count_quantifier
41+ [
42+ (decimal_digits) @constant.numeric
43+ "," @punctuation.delimiter
44+ ])
45+
46+(character_class
47+ [
48+ "^" @operator
49+ (class_range "-" @operator)
50+ ])
51+
52+(class_character) @constant.character
53+(pattern_character) @string
runtime/queries/rust/injections.scm+14
@@ -10,3 +10,17 @@
10 (token_tree) @injection.content)
10 (token_tree) @injection.content)
11 (#set! injection.language "rust")
11 (#set! injection.language "rust")
12 (#set! injection.include-children))
12 (#set! injection.include-children))
13+
14+(call_expression
15+ function: (scoped_identifier
16+ path: (identifier) @_regex (#eq? @_regex "Regex")
17+ name: (identifier) @_new (#eq? @_new "new"))
18+ arguments: (arguments (raw_string_literal) @injection.content)
19+ (#set! injection.language "regex"))
20+
21+(call_expression
22+ function: (scoped_identifier
23+ path: (scoped_identifier (identifier) @_regex (#eq? @_regex "Regex") .)
24+ name: (identifier) @_new (#eq? @_new "new"))
25+ arguments: (arguments (raw_string_literal) @injection.content)
26+ (#set! injection.language "regex"))
theme.toml+1
@@ -32,6 +32,7 @@ label = "honey"
32"markup.bold" = { modifiers = ["bold"] }
32"markup.bold" = { modifiers = ["bold"] }
33"markup.italic" = { modifiers = ["italic"] }
33"markup.italic" = { modifiers = ["italic"] }
34"markup.link.url" = { fg = "silver", modifiers = ["underlined"] }
34"markup.link.url" = { fg = "silver", modifiers = ["underlined"] }
35+"markup.link.text" = "almond"
35"markup.raw" = "almond"
36"markup.raw" = "almond"
36
37
37"diff.plus" = "#35bf86"
38"diff.plus" = "#35bf86"