Nik Revenco
b273b89249
Merge branch 'master' into rust-better-fns
2025-07-14 02:00:34 +01:00
Michael Davis
86f10ae24c
Add a language to fix Rust highlights in format-args macros
...
This is a bit hacky. Injections cannot stack on each other like
highlights because layers can have their own injections. So this new
language `rust-format-args-macro` emulates that. It unconditionally
injects `rust-format-args` into all strings. Rust injects this new
language into known format-args macros like `println!`.
The downside is that this can cause false-positive highlights within
these macros for strings which happen to contain format-args syntax
println!("Hello, {}!", "{}");
// ^ format args syntax
// ^ not format args syntax, but highlighted
// as if it were :(
This false-positive case is expected to be rare.
Injecting this fake language fixes regular non-string highlights in
macro invocations: macro invocations need to inject the entire token
tree and use `injection.include-children` for proper highlighting.
2025-07-13 12:01:18 -04:00
Nik Revenco
963475d7bf
Merge branch 'master' into rust-better-fns
2025-07-12 15:46:51 +01:00
Nik Revenco
df1ea8cba3
queries: do not highlight `bar` in `bar = || ()` as closure
2025-07-12 15:42:34 +01:00
Nik Revenco
db15411f63
queries: highlight more patterns in parameters
2025-07-12 15:09:41 +01:00
Nik Revenco
6ddadd3fa7
queries: highlight local closures
2025-07-12 14:35:13 +01:00
Nik Revenco
36c4fa6ab4
fix: `map_or_else` has both arguments as closures
2025-07-12 14:24:38 +01:00
Nik Revenco
9de1c7213b
queries: `bar` in `let bar = || 4` is a function
2025-07-12 14:18:12 +01:00
Nik Revenco
b5a07f9974
queries: `bar` in `foo::bar` is always a function when passed as arg
2025-07-12 14:11:22 +01:00
Maikel Martens
43187f2ed3
Add Django language support ( #13935 )
2025-07-11 10:33:44 -04:00
Nik Revenco
42db29a32d
fix: highlight `_` in `[_]` as `@comment.unused`
2025-07-11 03:21:45 +01:00
Nik Revenco
fd11bd26cb
queries: improve `@function` highlights when passed as arguments
2025-07-11 03:16:35 +01:00
Kristoffer Plagborg Bak Sørensen
8e0f326ebb
languages: create dedicated language for json-ld ( #13925 )
2025-07-10 08:49:33 -05:00
connnnal
16d06643a4
queries: Odin or_break+or_continue keywords, struct indents
...
from https://github.com/tree-sitter-grammars/tree-sitter-odin/pull/25
2025-07-08 19:05:48 -04:00
Jonas Köhnen
febc3d03b3
queries/gomod: add "tool", "toolchain" to keywords ( #13913 )
2025-07-08 08:19:11 -05:00
Val Packett
fc53af9f4e
Add systemd-lsp and dts-lsp ( #13907 )
2025-07-07 15:55:19 -05:00
Remo Senekowitsch
479c3b5584
Add highlighting for git notes editmsg ( #13885 )
2025-07-05 10:23:53 -04:00
Kristoffer Plagborg Bak Sørensen
9789b27461
languages: add Java .properties file support ( #13874 )
2025-07-04 09:17:22 -05:00
Kristoffer Plagborg Bak Sørensen
6c6607ef62
queries: add textobjects for qml ( #13855 )
2025-07-03 22:19:22 -04:00
CalebLarsen
bcb6c20a84
queries: Add locals.scm for C. Improve C parameter highlights ( #13876 )
2025-07-02 17:41:28 -05:00
CalebLarsen
f7ab5ec4a1
queries: Update highlights for Odin ( #13877 )
2025-07-02 17:38:05 -05:00
Michael Davis
6081a5df81
queries: Fix precedence of Fennel highlights
2025-07-01 09:40:40 -04:00
Kristoffer Plagborg Bak Sørensen
91dff9393d
languages: add Caddyfile support ( #13859 )
...
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-06-30 09:45:22 -05:00
Nik Revenco
b036fa0b9b
fix: Highlight `'x'` as a character in Go
2025-06-30 10:29:20 -04:00
Nik Revenco
0d799235f6
feat: Inject markdown into Go's block documentation comments
...
more
chore: capture unlimited number of comments
Each commen
2025-06-30 10:29:20 -04:00
Kristoffer Plagborg Bak Sørensen
f75d71844f
queries: inject nix into `lib.literalExression` string contents ( #13851 )
2025-06-28 18:00:58 -04:00
Jonas Köhnen
d654a07d3d
queries/dockerfile: injections for heredocs ( #13852 )
2025-06-28 17:59:32 -04:00
Michael Davis
44293dfd22
Change tree-sitter parser for Git commit message files
...
The gbprod grammar is more complete and featureful than mine, and more
actively maintained. I will archive my tree-sitter-git-commit in favor
of gbprod's.
The new queries are based on the ones in the repo upstream but I
modified them to look similar to the highlights before this commit.
Also I've updated the tab-width so that change nodes in the generated
message are indented correctly.
2025-06-27 10:55:00 -04:00
Kristoffer Plagborg Bak Sørensen
a9d51ef258
queries: inject all lines in a newline escaped RUN Dockerfile instruction as bash ( #13845 )
2025-06-26 13:51:10 -04:00
CalebLarsen
60fce357fb
queries: Fix Rust function parameter locals tracking ( #13828 )
2025-06-24 08:08:25 -05:00
Nik Revenco
171dfc60e5
fix: highlight `floor` in `|> float.floor` as function in Gleam ( #13813 )
2025-06-21 14:50:52 -04:00
Nik Revenco
40a3fb9b92
feat: Improved syntax highlighting for Gleam ( #13807 )
2025-06-21 12:24:19 -05:00
Margret Riegert
c96642125f
Update Crystal tree sitter and add support for ameba-ls ( #13805 )
...
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-06-21 12:02:16 -05:00
Damir Vandic
3c6c221d45
Update gleam tree-sitter grammar ( #13793 )
2025-06-18 09:32:41 -05:00
Alan
6b94d70f20
chore: bump purescript grammar ( #13782 )
2025-06-18 09:11:28 -05:00
Michael Davis
fed3edcab7
queries: Fix highlighting of '#' in CSS color hex codes
...
This was previously highlighted as `punctuation` because the capture
applied to the whole `(color_value)` node rather than the `"#"` child
node specifically.
2025-06-16 13:43:41 -04:00
CalebLarsen
1246549afd
Fix: update c++ highlights ( #13772 )
2025-06-16 08:04:22 -05:00
uncenter
ada8004ea5
Highlight HTML entities ( #13753 )
2025-06-16 08:03:02 -05:00
uncenter
6e4ec96101
Highlight Ecma escape sequences ( #13762 )
2025-06-13 09:15:40 -05:00
CalebLarsen
62f270e5d2
chore: updated c,c++ highlights ( #13747 )
2025-06-12 09:28:09 -05:00
Caleb Larsen
ae3eac8aeb
fix: Rust now correctly highlights doc comments as @comment.{block,line}.documentation instead of @comment
2025-06-10 10:54:05 -04:00
CalebLarsen
2b26d27416
fix: re-ordered and updated python highlights ( #13715 )
2025-06-08 21:34:37 -04:00
Grey
e773d6cc92
feat: add luau grammars and lsp ( #13702 )
...
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-06-08 15:21:08 -04:00
Michael Davis
25b299abc5
queries: Recognize methods as a locals scope
...
This fixes a bug in highlighting parameter variables in Go methods.
See <https://redirect.github.com/helix-editor/helix/issues/13674#issuecomment-2935514099 >
2025-06-06 11:48:18 -04:00
Matt Conway
d375f1e7f4
syntax: add grammar and highlighting for the alloy config lang ( #13660 )
2025-06-06 10:02:30 -05:00
Nik Revenco
2baff46b25
fix: Some Incorrect Rust highlights ( #13657 )
...
Co-authored-by: Nik Revenco <154856872+NikitaRevenco@users.noreply.github.com>
2025-05-31 09:43:19 -05:00
Jonas Köhnen
921ca08e1b
highlights/go: fix locals clashing with variable.other.member ( #13644 )
2025-05-31 09:41:19 -05:00
Jeff Bencin
17fb12bcf3
feat: Add Clarity language support ( #13647 )
2025-05-31 09:11:16 -05:00
Binh Tran
8d58f6ce8d
fix(highlights/ungrammar): improve UX ( #13607 )
2025-05-25 08:47:10 -05:00
Nik Revenco
1023e8f964
feat: highlight rust string interpolation macros that use `format_args!` ( #13533 )
...
Co-authored-by: Nik Revenco <154856872+NikitaRevenco@users.noreply.github.com>
2025-05-24 10:02:32 -05:00