feat(caddy): add parser and queries (#7588)

---------

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
This commit is contained in:
Vladimir Levin 2025-03-24 01:04:41 +09:00 committed by GitHub
parent b454febfd9
commit 9399bfd816
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 78 additions and 0 deletions

1
queries/caddy/folds.scm Normal file
View file

@ -0,0 +1 @@
(block) @fold

View file

@ -0,0 +1,55 @@
(comment) @comment @spell
[
(env)
(argv)
(block_variable)
(placeholder)
] @constant
(value) @variable
(directive
(keyword) @attribute)
(global_options
(option
(keyword) @attribute))
(keyword) @keyword
(boolean) @boolean
(placeholder
[
"{"
"}"
] @punctuation.special)
(auto) @variable.builtin
[
(string_literal)
(quoted_string_literal)
(address)
] @string
[
(matcher)
(route)
(snippet_name)
] @string.special
[
(numeric_literal)
(time)
(size)
(ip_literal)
] @number
[
"{"
"}"
] @punctuation.bracket
"," @punctuation.delimiter

View file

@ -0,0 +1,8 @@
(block) @indent.begin
(block
"}" @indent.branch)
(comment) @indent.auto
(ERROR) @indent.auto

View file

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))