mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 20:10:10 -04:00
* Add initial surface highlights & injections * Additional surface highlights * Filetype detection, fix injections * Fix Elixir function highlight when left is an identifier * Add surface parser * Fix comment highlights * Surface folds, indents, better highlights * Highlight surface components & directives * Restore comments Elixir injections
46 lines
1 KiB
Scheme
46 lines
1 KiB
Scheme
; Surface text is highlighted as such
|
|
(text) @text
|
|
|
|
; Surface has two types of comments, both are highlighted as such
|
|
(comment) @comment
|
|
|
|
; Surface attributes are highlighted as HTML attributes
|
|
(attribute_name) @tag.attribute
|
|
|
|
; Attributes are highlighted as strings
|
|
(attribute_value) @string
|
|
|
|
; Surface blocks are highlighted as keywords
|
|
[
|
|
(start_block)
|
|
(end_block)
|
|
(subblock)
|
|
] @keyword
|
|
|
|
; Surface supports HTML tags and are highlighted as such
|
|
[
|
|
(start_tag)
|
|
(end_tag)
|
|
(self_closing_tag)
|
|
(start_component)
|
|
(end_component)
|
|
(self_closing_component)
|
|
] @tag.delimiter
|
|
|
|
; Expressions are similar to string interpolation, and are highloghted as such
|
|
(expression) @punctuation.special
|
|
|
|
; Expressions should be highlighted as Elixir, fallback to special strings
|
|
(expression_value) @string.special
|
|
|
|
; Surface tags are highlighted as HTML
|
|
(tag_name) @tag
|
|
|
|
; Surface components are highlighted as types (Elixir modules)
|
|
(component_name) @type
|
|
|
|
; Surface directives are highlighted as keywords
|
|
(directive_name) @keyword
|
|
|
|
; Surface operators
|
|
["="] @operator
|