diff options
| author | Ćukasz Niemier <lukasz@niemier.pl> | 2021-11-02 16:54:34 +0100 |
|---|---|---|
| committer | Santos Gallegos <stsewd@protonmail.com> | 2021-11-12 13:42:36 -0500 |
| commit | fdcd0edf24ea23ebd2e82899a1401ef1f9f05872 (patch) | |
| tree | e83a8fb851e154183080edcdf17dbbee6ec7e889 | |
| parent | fix: Elixir non-doc sigils will no longer be flickering (diff) | |
| download | nvim-treesitter-fdcd0edf24ea23ebd2e82899a1401ef1f9f05872.tar nvim-treesitter-fdcd0edf24ea23ebd2e82899a1401ef1f9f05872.tar.gz nvim-treesitter-fdcd0edf24ea23ebd2e82899a1401ef1f9f05872.tar.bz2 nvim-treesitter-fdcd0edf24ea23ebd2e82899a1401ef1f9f05872.tar.lz nvim-treesitter-fdcd0edf24ea23ebd2e82899a1401ef1f9f05872.tar.xz nvim-treesitter-fdcd0edf24ea23ebd2e82899a1401ef1f9f05872.tar.zst nvim-treesitter-fdcd0edf24ea23ebd2e82899a1401ef1f9f05872.zip | |
fix: make comment doc highlighting work for any doc tag
| -rw-r--r-- | queries/elixir/highlights.scm | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/queries/elixir/highlights.scm b/queries/elixir/highlights.scm index b69bdbcdd..1a93a7687 100644 --- a/queries/elixir/highlights.scm +++ b/queries/elixir/highlights.scm @@ -180,13 +180,6 @@ ] operator: "/" right: (integer) @operator) ]) -; Module attributes -(unary_operator - operator: "@" @constant - operand: [ - (identifier) @constant - (call target: (identifier) @constant)]) - ; Sigils (sigil "~" @string.special @@ -205,10 +198,20 @@ ((sigil_modifiers) @string)? (#any-of? @_sigil_name "s" "S")) +; Module attributes +(unary_operator + operator: "@" + operand: [ + (identifier) + (call target: (identifier) @constant)]) @constant + ; Documentation (unary_operator - operator: "@" @comment + operator: "@" operand: (call - target: ((identifier) @_identifier) - _) @comment - (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc")) + target: ((identifier) @_identifier (#match? @_identifier "doc$")) @comment + (arguments [ + (string) + (boolean) + (charlist) + ] @comment))) @comment |
