From 222d5d89af7f5ded2c67260ca96d9d693a1f746c Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Wed, 3 Apr 2024 17:22:41 -0400 Subject: [PATCH] Add regex highlighting to php as syntax-based indentation is broken with just treesitter --- vim/colors/darkcloud.vim | 2 ++ vim/config/plugins/nvim-treesitter.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vim/colors/darkcloud.vim b/vim/colors/darkcloud.vim index f506f1b..070a5f8 100644 --- a/vim/colors/darkcloud.vim +++ b/vim/colors/darkcloud.vim @@ -245,6 +245,8 @@ endfun hi! link objcSuperclass objcClass "php + call s:C("phpIdentifier",g:cBlue,"","") + call s:C("phpRelation",g:cYellow,"","") hi! link phpArrayPair Operator hi! link phpNull Constant hi! link phpSuperglobal Identifier diff --git a/vim/config/plugins/nvim-treesitter.lua b/vim/config/plugins/nvim-treesitter.lua index 448343c..fbc6804 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", "tmux" }, - additional_vim_regex_highlighting = { "diff", "scss" }, + additional_vim_regex_highlighting = { "diff", "php", "scss" }, }, textobjects = {