diff options
-rw-r--r-- | fnl/nvrc/colors.fnl | 4 | ||||
-rw-r--r-- | fnl/nvrc/packs/treesitter.fnl | 29 |
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}) |