diff options
| author | Vladimir Levin <34550675+opa-oz@users.noreply.github.com> | 2025-03-24 01:04:41 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-23 16:04:41 +0000 |
| commit | 9399bfd816f7193b6fa801169f6a907afdd66e5c (patch) | |
| tree | ffb6a0d96daccd987c69f3d72b8085ab481faf29 /queries | |
| parent | bot(readme): update (diff) | |
| download | nvim-treesitter-9399bfd816f7193b6fa801169f6a907afdd66e5c.tar nvim-treesitter-9399bfd816f7193b6fa801169f6a907afdd66e5c.tar.gz nvim-treesitter-9399bfd816f7193b6fa801169f6a907afdd66e5c.tar.bz2 nvim-treesitter-9399bfd816f7193b6fa801169f6a907afdd66e5c.tar.lz nvim-treesitter-9399bfd816f7193b6fa801169f6a907afdd66e5c.tar.xz nvim-treesitter-9399bfd816f7193b6fa801169f6a907afdd66e5c.tar.zst nvim-treesitter-9399bfd816f7193b6fa801169f6a907afdd66e5c.zip | |
feat(caddy): add parser and queries (#7588)
---------
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/caddy/folds.scm | 1 | ||||
| -rw-r--r-- | queries/caddy/highlights.scm | 55 | ||||
| -rw-r--r-- | queries/caddy/indents.scm | 8 | ||||
| -rw-r--r-- | queries/caddy/injections.scm | 2 |
4 files changed, 66 insertions, 0 deletions
diff --git a/queries/caddy/folds.scm b/queries/caddy/folds.scm new file mode 100644 index 000000000..fd7d23999 --- /dev/null +++ b/queries/caddy/folds.scm @@ -0,0 +1 @@ +(block) @fold diff --git a/queries/caddy/highlights.scm b/queries/caddy/highlights.scm new file mode 100644 index 000000000..47a170f76 --- /dev/null +++ b/queries/caddy/highlights.scm @@ -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 diff --git a/queries/caddy/indents.scm b/queries/caddy/indents.scm new file mode 100644 index 000000000..b746788ab --- /dev/null +++ b/queries/caddy/indents.scm @@ -0,0 +1,8 @@ +(block) @indent.begin + +(block + "}" @indent.branch) + +(comment) @indent.auto + +(ERROR) @indent.auto diff --git a/queries/caddy/injections.scm b/queries/caddy/injections.scm new file mode 100644 index 000000000..2f0e58eb6 --- /dev/null +++ b/queries/caddy/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) |
