1

Regenerate nvim config

This commit is contained in:
2024-06-02 03:29:20 +02:00
parent 75eea0c030
commit ef2e28883d
5576 changed files with 604886 additions and 503 deletions

View File

@ -0,0 +1,6 @@
; HEEx tags, components, and slots fold similar to HTML
[
(component)
(tag)
(slot)
] @fold

View File

@ -0,0 +1,54 @@
; HEEx delimiters
[
"%>"
"--%>"
"-->"
"/>"
"<!"
"<!--"
"<"
"<%!--"
"<%"
"<%#"
"<%%="
"<%="
"</"
"</:"
"<:"
">"
"{"
"}"
] @tag.delimiter
; HEEx operators are highlighted as such
"=" @operator
; HEEx inherits the DOCTYPE tag from HTML
(doctype) @constant
; HEEx comments are highlighted as such
(comment) @comment @spell
; HEEx text content is treated as markup
; (text) @none
; HEEx tags and slots are highlighted as HTML
[
(tag_name)
(slot_name)
] @tag
; HEEx attributes are highlighted as HTML attributes
(attribute_name) @tag.attribute
[
(attribute_value)
(quoted_attribute_value)
] @string
; HEEx components are highlighted as modules and function calls
(component_name
[
(module) @type
(function) @function
"." @punctuation.delimiter
])

View File

@ -0,0 +1,20 @@
; HEEx tags, components, and slots indent like HTML
[
(component)
(slot)
(tag)
] @indent.begin
; Dedent at the end of each tag, component, and slot
[
(end_component)
(end_slot)
(end_tag)
] @indent.branch @indent.dedent
; Self-closing tags and components should not change
; indentation level of sibling nodes
[
(self_closing_component)
(self_closing_tag)
] @indent.auto

View File

@ -0,0 +1,30 @@
; directives are standalone tags like '<%= @x %>'
;
; partial_expression_values are elixir code that is part of an expression that
; spans multiple directive nodes, so they must be combined. For example:
; <%= if true do %>
; <p>hello, tree-sitter!</p>
; <% end %>
(directive
[
(partial_expression_value)
(ending_expression_value)
] @injection.content
(#set! injection.language "elixir")
(#set! injection.include-children)
(#set! injection.combined))
; Regular expression_values do not need to be combined
((directive
(expression_value) @injection.content)
(#set! injection.language "elixir"))
; expressions live within HTML tags, and do not need to be combined
; <link href={ Routes.static_path(..) } />
(expression
(expression_value) @injection.content
(#set! injection.language "elixir"))
; HEEx comments
((comment) @injection.content
(#set! injection.language "comment"))

View File

@ -0,0 +1,13 @@
; HEEx tags, components, and slots are references
[
(component_name)
(slot_name)
(tag_name)
] @local.reference
; Create a new scope within each HEEx tag, component, and slot
[
(component)
(slot)
(tag)
] @local.scope