about summary refs log tree commit diff
path: root/fnl/nvrc/packs
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-05-19 01:21:06 +0900
committersefidel <contact@sefidel.net>2024-05-19 01:21:06 +0900
commit0d87bda3848b655ace4711172244e8bdd2bf3366 (patch)
treeadf718cafc021b184312887428229d24aae98dd2 /fnl/nvrc/packs
parent1442e6674d118a38f314a803b7713e63377da1b0 (diff)
downloadnvimrc-0d87bda3848b655ace4711172244e8bdd2bf3366.tar.gz
nvimrc-0d87bda3848b655ace4711172244e8bdd2bf3366.zip
feat(packs/treesitter): jellybeans colour correction
Diffstat (limited to 'fnl/nvrc/packs')
-rw-r--r--fnl/nvrc/packs/treesitter.fnl29
1 files changed, 27 insertions, 2 deletions
diff --git a/fnl/nvrc/packs/treesitter.fnl b/fnl/nvrc/packs/treesitter.fnl
index 8a88487..3e725dd 100644
--- a/fnl/nvrc/packs/treesitter.fnl
+++ b/fnl/nvrc/packs/treesitter.fnl
@@ -1,6 +1,6 @@
-(local {: setup} (require :nvim-treesitter.configs))
+(import-macros {: highlight!} :nvrc.macro.color)
 
-(local colors (require :nvrc.colors))
+(local {: setup} (require :nvim-treesitter.configs))
 
 (setup {:ensure_installed [:fennel :lua :nix :rust :haskell :c :go :typst :comment]
         :highlight {:enable true :use_languagetree true}
@@ -52,3 +52,28 @@
                              :goto_previous_end {"[F" "@function.outer"
                                                  "[]" "@class.outer"}}}
         :indent {:enable true}})
+
+; Treesitter colour corrections
+; Match jellybeans.vim colourscheme
+(highlight! "@variable" {:link :Normal})
+
+; (highlight! "@constant.builtin" {:link :Constant})
+;
+; (highlight! "@type.builtin" {:link :Type})
+
+(highlight! "@keyword.modifier" {:link :StorageClass})
+(highlight! "@keyword.directive" {:link :PreProc})
+; (highlight! "@keyword.function" {:link :Define})
+
+; (highlight! "@punctuation.delimiter" {:link :Normal})
+(highlight! "@punctuation.bracket" {:link :Normal})
+
+;; C/C++
+(highlight! "@keyword.import.c" {:link :PreProc})
+(highlight! "@keyword.import.cpp" {:link "@keyword.import.c"})
+
+;; Ruby
+(highlight! "@variable.member.ruby" {:link :rubyInstanceVariable})
+
+(highlight! "@keyword.type.ruby" {:link :rubyClass})
+(highlight! "@keyword.ruby" {:link :rubyClass})