switch to tree-sitter-ron (#8624)

This commit is contained in:
Gabriel Dinner-David 2023-10-26 19:40:16 -04:00 committed by GitHub
parent 553ffbcaa0
commit 4f1d414d9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 4 deletions

View file

@ -1689,7 +1689,10 @@ file-types = ["ron"]
roots = [] roots = []
comment-token = "//" comment-token = "//"
indent = { tab-width = 4, unit = " " } indent = { tab-width = 4, unit = " " }
grammar = "rust"
[[grammar]]
name = "ron"
source = { git = "https://github.com/zee-editor/tree-sitter-ron", rev = "7762d709a0f7c1f9e269d0125a2e8a7a69006146" }
[[language]] [[language]]
name = "robot" name = "robot"

View file

@ -1 +1,43 @@
; inherits: rust ; Literals
;------------
(string) @string
(boolean) @constant.builtin.boolean
(integer) @constant.numeric.integer
(float) @constant.numeric.float
(char) @constant.character
; Structs
;------------
(enum_variant) @type.enum.variant
(struct_entry (_) @variable.other.member ":")
(struct_name (identifier)) @type
; Comments
;------------
(line_comment) @comment.line
(block_comment) @comment.block
; Punctuation
;------------
"," @punctuation.delimiter
":" @punctuation.delimiter
"(" @punctuation.bracket
")" @punctuation.bracket
"[" @punctuation.bracket
"]" @punctuation.bracket
"{" @punctuation.bracket
"}" @punctuation.bracket
; Special
;------------
(escape_sequence) @constant.character.escape

View file

@ -1 +1,12 @@
; inherits: rust [
(array)
(map)
(tuple)
(struct)
] @indent
[
"}"
"]"
")"
] @outdent

View file

@ -1 +1,2 @@
; inherits: rust ([(line_comment) (block_comment)] @injection.content
(#set! injection.language "comment"))