~toastal/nvim-tree-sitter-unicode-conceal
Showing details for patch 8c47ef567ef9a5e0aa6b65a918baf6d26bb214e4.
diff -rN -u old-nvim-tree-sitter-unicode-conceal/after/queries/c/highlights.scm new-nvim-tree-sitter-unicode-conceal/after/queries/c/highlights.scm --- old-nvim-tree-sitter-unicode-conceal/after/queries/c/highlights.scm 1970-01-01 00:00:00.000000000 +0000 +++ new-nvim-tree-sitter-unicode-conceal/after/queries/c/highlights.scm 2024-11-21 17:07:46.205673388 +0000 @@ -0,0 +1,34 @@ +;; SPDX-FileCopyrightText 2024 toastal <toastal@posteo.net> +;; SPDX-License-Identifier: LGPL-2.1-or-later +; extends + +(return_statement ("return" @keyword.return (#set! conceal "⮡"))) +(assignment_expression ("=" @operator.assignment (#set! conceal "≔"))) + +("&&" @keyword.operator (#set! conceal "∧")) +("||" @keyword.operator (#set! conceal "∨")) +("!" @operator (#set! conceal "¬")) +("==" @operator (#set! conceal "=")) +("!=" @operator (#set! conceal "≠")) +("<=" @operator (#set! conceal "≤")) +(">=" @operator (#set! conceal "≥")) + +(binary_expression ("-" @operator (#set! conceal "−"))) +(binary_expression ("*" @operator (#set! conceal "×"))) +(binary_expression ("/" @operator (#set! conceal "÷"))) + +("->" @operator (#set! conceal "→")) +([(pointer_expression ("*" @operator.c))] (#set! conceal "►")) +((pointer_declarator ("*" @operator.c)) (#set! conceal "◄")) +(pointer_expression ("&" @operator.c) (#set! conceal "※")) + +(((primitive_type) @type.builtin (#eq? @type.builtin "bool")) (#set! conceal "𝔹")) +(((primitive_type) @type.builtin (#eq? @type.builtin "int")) (#set! conceal "ℤ")) +(((primitive_type) @type.builtin (#eq? @type.builtin "uint")) (#set! conceal "ℕ")) +(((primitive_type) @type.builtin (#eq? @type.builtin "void")) (#set! conceal "⦰")) +((null) @constant.builtin (#set! conceal "∅")) + +((call_expression function: (identifier) @function.call.c (#eq? @function.call.c "floor")) (#set! conceal "⌊")) +((call_expression function: (identifier) @function.call.c (#eq? @function.call.c "ceil")) (#set! conceal "⌈")) +((call_expression function: (identifier) @function.call.c (#eq? @function.call.c "round")) (#set! conceal "⁅")) +