diff options
| author | Cormac Relf <web@cormacrelf.net> | 2022-10-18 13:02:22 +0200 |
|---|---|---|
| committer | Christian Clason <christian.clason@uni-due.de> | 2022-11-06 11:34:13 +0100 |
| commit | 8c7ffaf66beb16cc22c2cf87dc07bf7776a7b2f9 (patch) | |
| tree | 127a3c74a2f8f47d07510302f13862174e8f03d4 /queries/rust/highlights.scm | |
| parent | fix: update scheme queries to parser change (diff) | |
| download | nvim-treesitter-8c7ffaf66beb16cc22c2cf87dc07bf7776a7b2f9.tar nvim-treesitter-8c7ffaf66beb16cc22c2cf87dc07bf7776a7b2f9.tar.gz nvim-treesitter-8c7ffaf66beb16cc22c2cf87dc07bf7776a7b2f9.tar.bz2 nvim-treesitter-8c7ffaf66beb16cc22c2cf87dc07bf7776a7b2f9.tar.lz nvim-treesitter-8c7ffaf66beb16cc22c2cf87dc07bf7776a7b2f9.tar.xz nvim-treesitter-8c7ffaf66beb16cc22c2cf87dc07bf7776a7b2f9.tar.zst nvim-treesitter-8c7ffaf66beb16cc22c2cf87dc07bf7776a7b2f9.zip | |
highlights(rust): panic!() and assert!() as @exception
Diffstat (limited to 'queries/rust/highlights.scm')
| -rw-r--r-- | queries/rust/highlights.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm index 3df682c34..01a627734 100644 --- a/queries/rust/highlights.scm +++ b/queries/rust/highlights.scm @@ -273,3 +273,8 @@ (inner_attribute_item ["!" "#"] @punctuation.special) (macro_invocation "!" @function.macro) (empty_type "!" @type.builtin) + +(macro_invocation macro: (identifier) @_ident @exception "!" @exception + (#eq? @_ident "panic")) +(macro_invocation macro: (identifier) @_ident @exception "!" @exception + (#contains? @_ident "assert")) |
