From 571ec0a0093d0308da27c2fd15a7f30bdafa4635 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 28 Mar 2024 21:40:22 -0400 Subject: [PATCH] Get the treesitter diff parser colors working nicely by defining some colors and mixing it with the classic syntax --- vim/colors/darkcloud.vim | 7 +++++++ vim/config/plugins/nvim-treesitter.lua | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vim/colors/darkcloud.vim b/vim/colors/darkcloud.vim index 0860eb5..084f6ba 100644 --- a/vim/colors/darkcloud.vim +++ b/vim/colors/darkcloud.vim @@ -409,6 +409,13 @@ endfun hi! link @number.scss @number.css hi! link @property.scss @property.css hi! link @variable.scss @variable.css + + "diff + call s:C("@attribute.diff",g:cYellow,"","") + call s:C("@constant.diff",g:cBlue,"","italic") + call s:C("@diff.minus",g:cYellow,"","") + call s:C("@diff.plus",g:cBlue,"","") + call s:C("@function.diff",g:cRed,"","bold") endif "}}} diff --git a/vim/config/plugins/nvim-treesitter.lua b/vim/config/plugins/nvim-treesitter.lua index 6d83ca5..72b163b 100644 --- a/vim/config/plugins/nvim-treesitter.lua +++ b/vim/config/plugins/nvim-treesitter.lua @@ -18,7 +18,7 @@ if (vim.g.enabletreesitter == 1) then highlight = { enable = true, disable = { "gitcommit", "markdown" }, - additional_vim_regex_highlighting = { "scss" }, + additional_vim_regex_highlighting = { "diff", "scss" }, }, textobjects = {