Skip to content

Update tree-sitter-rust and fix C, Rust and Erlang highlights #3467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ args = { attachCommands = [ "platform select remote-gdb-server", "platform conne

[[grammar]]
name = "rust"
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "a360da0a29a19c281d08295a35ecd0544d2da211" }
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "41e23b454f503e6fe63ec4b6d9f7f2cf7788ab8e" }

[[language]]
name = "toml"
Expand Down Expand Up @@ -1104,6 +1104,14 @@ comment-token = "%%"
indent = { tab-width = 4, unit = " " }
language-server = { command = "erlang_ls" }

[language.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'
"'" = "'"
'`' = "'"

[[grammar]]
name = "erlang"
source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "0e7d677d11a7379686c53c616825714ccb728059" }
Expand Down
5 changes: 5 additions & 0 deletions runtime/queries/c/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"union" @keyword
"volatile" @keyword
"while" @keyword
"const" @keyword

[
"#define"
Expand Down Expand Up @@ -50,10 +51,14 @@
"==" @operator
">" @operator
"||" @operator
">=" @operator
"<=" @operator

"." @punctuation.delimiter
";" @punctuation.delimiter

[(true) (false)] @constant.builtin.boolean

(enumerator) @type.enum.variant

(string_literal) @string
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/erlang/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.
[(atom) @type (macro)]
[
(tuple (atom) @variable.other.member)
(tuple (atom)? @variable.other.member)
(tuple
(binary_operator
left: (atom) @variable.other.member
Expand Down
1 change: 1 addition & 0 deletions runtime/queries/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"]"
"{"
"}"
"#"
] @punctuation.bracket
(type_arguments
[
Expand Down