mirror of https://github.com/helix-editor/helix
Add LLVM TableGen highlighting (#1409)
Add a tree-sitter grammar and highlights for TableGen files. TableGen and its grammar are described here: https://llvm.org/docs/TableGen/index.html Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>pull/1398/head^2
parent
93a948d889
commit
8f2af71340
@ -0,0 +1 @@
|
||||
Subproject commit 568dd8a937347175fd58db83d4c4cdaeb6069bd2
|
@ -0,0 +1,90 @@
|
||||
[
|
||||
(comment)
|
||||
(multiline_comment)
|
||||
] @comment
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"<"
|
||||
">"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
","
|
||||
";"
|
||||
"."
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"#"
|
||||
"-"
|
||||
"..."
|
||||
":"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"="
|
||||
"!cond"
|
||||
(operator_keyword)
|
||||
] @function
|
||||
|
||||
[
|
||||
"true"
|
||||
"false"
|
||||
] @constant.builtin.boolean
|
||||
|
||||
[
|
||||
"?"
|
||||
] @constant.builtin
|
||||
|
||||
(var) @variable
|
||||
|
||||
(template_arg (identifier) @variable.parameter)
|
||||
|
||||
(_ argument: (value (identifier) @variable.parameter))
|
||||
|
||||
(type) @type
|
||||
|
||||
"code" @type.builtin
|
||||
|
||||
(number) @constant.numeric.integer
|
||||
[
|
||||
(string_string)
|
||||
(code_string)
|
||||
] @string
|
||||
|
||||
(preprocessor) @keyword.directive
|
||||
|
||||
[
|
||||
"class"
|
||||
"field"
|
||||
"let"
|
||||
"defvar"
|
||||
"def"
|
||||
"defset"
|
||||
"defvar"
|
||||
"assert"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"let"
|
||||
"in"
|
||||
"foreach"
|
||||
"if"
|
||||
"then"
|
||||
"else"
|
||||
] @keyword.operator
|
||||
|
||||
"include" @keyword.control.import
|
||||
|
||||
[
|
||||
"multiclass"
|
||||
"defm"
|
||||
] @namespace
|
||||
|
||||
(ERROR) @error
|
@ -0,0 +1,7 @@
|
||||
indent = [
|
||||
"statement",
|
||||
]
|
||||
|
||||
outdent = [
|
||||
"}",
|
||||
]
|
@ -0,0 +1,2 @@
|
||||
([ (comment) (multiline_comment)] @injection.content
|
||||
(#set! injection.language "comment"))
|
@ -0,0 +1,7 @@
|
||||
(class
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(multiclass
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(_ argument: _ @parameter.inside)
|
Loading…
Reference in New Issue