diff options
| author | Clay <connorlay@pm.me> | 2022-01-23 20:40:21 -0800 |
|---|---|---|
| committer | Christian Clason <christian.clason@uni-due.de> | 2022-01-24 08:27:44 +0100 |
| commit | c7d5ba7212d0e1d38e2b714eabe4452a80dfe945 (patch) | |
| tree | fcba98a96640891ba11fd0fee360c316bb72f94b /queries/elixir | |
| parent | Fix highlights of module attributes and doc sigils (diff) | |
| download | nvim-treesitter-c7d5ba7212d0e1d38e2b714eabe4452a80dfe945.tar nvim-treesitter-c7d5ba7212d0e1d38e2b714eabe4452a80dfe945.tar.gz nvim-treesitter-c7d5ba7212d0e1d38e2b714eabe4452a80dfe945.tar.bz2 nvim-treesitter-c7d5ba7212d0e1d38e2b714eabe4452a80dfe945.tar.lz nvim-treesitter-c7d5ba7212d0e1d38e2b714eabe4452a80dfe945.tar.xz nvim-treesitter-c7d5ba7212d0e1d38e2b714eabe4452a80dfe945.tar.zst nvim-treesitter-c7d5ba7212d0e1d38e2b714eabe4452a80dfe945.zip | |
Add new Elixir language injections
Diffstat (limited to 'queries/elixir')
| -rw-r--r-- | queries/elixir/injections.scm | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/queries/elixir/injections.scm b/queries/elixir/injections.scm index 00d98b32e..c4c12cc1a 100644 --- a/queries/elixir/injections.scm +++ b/queries/elixir/injections.scm @@ -1,21 +1,43 @@ -(sigil - (sigil_name) @_sigil_name - (quoted_content) @surface -(#eq? @_sigil_name "F")) +; Comments +(comment) @comment + +; Documentation +(unary_operator + operator: "@" + operand: (call + target: ((identifier) @_identifier (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc")) + (arguments [ + (string (quoted_content) @markdown) + (sigil (quoted_content) @markdown) + ]))) +; HEEx (sigil (sigil_name) @_sigil_name (quoted_content) @heex (#eq? @_sigil_name "H")) +; Surface +(sigil + (sigil_name) @_sigil_name + (quoted_content) @surface +(#eq? @_sigil_name "F")) + +; Zigler (sigil (sigil_name) @_sigil_name (quoted_content) @zig -(#eq? @_sigil_name "Z")) +(#any-of? @_sigil_name "z" "Z")) +; Regex (sigil (sigil_name) @_sigil_name (quoted_content) @regex (#any-of? @_sigil_name "r" "R")) -(comment) @comment +; Jason +(sigil + (sigil_name) @_sigil_name + (quoted_content) @json +(#any-of? @_sigil_name "j" "J")) + |
