about summary refs log tree commit diff
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
parent1442e6674d118a38f314a803b7713e63377da1b0 (diff)
downloadnvimrc-0d87bda3848b655ace4711172244e8bdd2bf3366.tar.gz
nvimrc-0d87bda3848b655ace4711172244e8bdd2bf3366.zip
feat(packs/treesitter): jellybeans colour correction
-rw-r--r--fnl/nvrc/colors.fnl4
-rw-r--r--fnl/nvrc/packs/treesitter.fnl29
2 files changed, 29 insertions, 4 deletions
diff --git a/fnl/nvrc/colors.fnl b/fnl/nvrc/colors.fnl
index cea5567..3a6ca7b 100644
--- a/fnl/nvrc/colors.fnl
+++ b/fnl/nvrc/colors.fnl
@@ -63,7 +63,7 @@
   ; Treesitter extensions
   (highlight! "@text.note" {:fg (. colors :skyblue) :bold true})
   (highlight! "@text.warning" {:fg (. colors :yellow) :bold true})
-  (highlight! "@text.danger" {:fg (. colors :red) :bold true})
-  (highlight! "@variable" {:link :Normal}))
+  (highlight! "@text.danger" {:fg (. colors :red) :bold true}))
+
 
 colors
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})