feat(edf): add parser and queries

This commit is contained in:
ph1losof 2026-01-07 17:51:01 +01:00
parent de878155ca
commit 77c6930b6d
3 changed files with 51 additions and 0 deletions

View file

@ -447,6 +447,14 @@ return {
maintainers = { '@ValdezFOmar' },
tier = 2,
},
edf = {
install_info = {
revision = 'c983376fc85491d06b7c2b7fdd945bc157c414ed',
url = 'https://github.com/ph1losof/tree-sitter-edf',
},
maintainers = { '@ph1losof' },
tier = 2,
},
eds = {
install_info = {
revision = '26d529e6cfecde391a03c21d1474eb51e0285805',

View file

@ -0,0 +1,6 @@
; Folds for EDF
[
(double_quoted_string)
(single_quoted_string)
] @fold

View file

@ -0,0 +1,37 @@
; Highlighting queries for EDF (Ecolog Dotenv File Format)
; Comments
(comment) @comment
(comment_content) @comment
(inline_comment) @comment
; Export keyword
(export_keyword) @keyword
; Keys (variable names)
(key) @property
; String values
(single_quoted_string) @string
(single_quoted_content) @string
(double_quoted_string) @string
(double_quoted_content) @string
(unquoted_content) @string
; Escape sequences in double-quoted strings
(escape_sequence) @string.escape
; Variable expansion ${VAR} and ${VAR:-default}
(variable_expansion) @variable
; Simple variable $VAR
(simple_variable) @variable
; Command substitution $(command) and `command`
(command_substitution) @function.macro
(backtick_substitution) @function.macro
; Operators and punctuation
"=" @operator
"'" @punctuation.delimiter
"\"" @punctuation.delimiter