about summary refs log tree commit diff
path: root/fnl/nvrc/packs/treesitter.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/nvrc/packs/treesitter.fnl')
-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})