diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-06-12 09:54:30 -0600 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 692b051b09935653befdb8f7ba8afdb640adf17b (patch) | |
| tree | 167162b6b129ae04f68c5735078521a72917c742 /runtime/queries/agda | |
| parent | feat(c-family): inherit injections (diff) | |
| download | nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2 nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip | |
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'runtime/queries/agda')
| -rw-r--r-- | runtime/queries/agda/folds.scm | 4 | ||||
| -rw-r--r-- | runtime/queries/agda/highlights.scm | 87 | ||||
| -rw-r--r-- | runtime/queries/agda/injections.scm | 14 |
3 files changed, 105 insertions, 0 deletions
diff --git a/runtime/queries/agda/folds.scm b/runtime/queries/agda/folds.scm new file mode 100644 index 000000000..5e1051f8f --- /dev/null +++ b/runtime/queries/agda/folds.scm @@ -0,0 +1,4 @@ +[ + (record) + (module) +] @fold diff --git a/runtime/queries/agda/highlights.scm b/runtime/queries/agda/highlights.scm new file mode 100644 index 000000000..4626a8c12 --- /dev/null +++ b/runtime/queries/agda/highlights.scm @@ -0,0 +1,87 @@ +; Constants +(integer) @number + +; Variables and Symbols +(typed_binding + (atom + (qid) @variable)) + +(untyped_binding) @variable + +(typed_binding + (expr) @type) + +(id) @function + +(bid) @function + +(function_name + (atom + (qid) @function)) + +(field_name) @function + +[ + (data_name) + (record_name) +] @constructor + +; Set +(SetN) @type.builtin + +(expr + . + (atom) @function) + +((atom) @boolean + (#any-of? @boolean "true" "false" "True" "False")) + +; Imports and Module Declarations +"import" @keyword.import + +(module_name) @module + +; Pragmas and comments +(pragma) @keyword.directive + +(comment) @comment @spell + +; Keywords +[ + "where" + "data" + "rewrite" + "postulate" + "public" + "private" + "tactic" + "Prop" + "quote" + "renaming" + "open" + "in" + "hiding" + "constructor" + "abstract" + "let" + "field" + "mutual" + "module" + "infix" + "infixl" + "infixr" +] @keyword + +"record" @keyword.type + +;(expr +; f_name: (atom) @function) +; Brackets +[ + "(" + ")" + "{" + "}" +] @punctuation.bracket + +"=" @operator diff --git a/runtime/queries/agda/injections.scm b/runtime/queries/agda/injections.scm new file mode 100644 index 000000000..a772e0bd9 --- /dev/null +++ b/runtime/queries/agda/injections.scm @@ -0,0 +1,14 @@ +((comment) @injection.content + (#set! injection.language "comment")) + +((comment) @injection.content + (#lua-match? @injection.content "^///[^/]") + (#set! injection.language "doxygen")) + +((comment) @injection.content + (#lua-match? @injection.content "^///$") + (#set! injection.language "doxygen")) + +((comment) @injection.content + (#lua-match? @injection.content "^/[*][*][^*].*[*]/$") + (#set! injection.language "doxygen")) |
