From 3ef260fbe4254d62f7c570dd9d97dad0f21b7b3e Mon Sep 17 00:00:00 2001 From: Iron-E Date: Mon, 5 Feb 2024 15:13:40 -0500 Subject: [PATCH] feat: support nvim-treesitter-context --- README.md | 3 +++ doc/highlite.txt | 3 +++ lua/highlite/groups/default.lua | 5 ++++- lua/highlite/groups/types.lua | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8203190..3b26de0 100644 --- a/README.md +++ b/README.md @@ -280,6 +280,9 @@ require('highlite').setup {
  • todo_comments
  • +
  • + treesitter_context +
  • trouble
  • diff --git a/doc/highlite.txt b/doc/highlite.txt index 3ef237b..c38b46b 100644 --- a/doc/highlite.txt +++ b/doc/highlite.txt @@ -234,6 +234,9 @@ neotest
  • todo_comments
  • +
  • + treesitter_context +
  • trouble
  • diff --git a/lua/highlite/groups/default.lua b/lua/highlite/groups/default.lua index 51d943c..03d9692 100644 --- a/lua/highlite/groups/default.lua +++ b/lua/highlite/groups/default.lua @@ -735,6 +735,10 @@ local function from_palette(palette, opts) groups.TodoSignWARN = 'TodoFgWARN' end + if all_syntax or nvim_plugins.treesitter_context ~= false then + groups.TreesitterContextLineNumber = Groups.extend({fg = sign_column.fg}, groups'NormalFloat') + end + if all_nvim_plugins or nvim_plugins.trouble ~= false then groups.TroubleCount = {fg = palette.number, sp = palette.text_contrast_bg_high, underline = true} end @@ -846,7 +850,6 @@ local function from_palette(palette, opts) groups.cppSTLexception = '@keyword.exception.cpp' groups.cppSTLnamespace = '@module.cpp' end - if all_syntax or syntax.cs ~= false then groups.csAccessModifier = '@keyword.cs' groups.csAccessor = 'csLogicSymbols' diff --git a/lua/highlite/groups/types.lua b/lua/highlite/groups/types.lua index 8a368c8..fee7638 100644 --- a/lua/highlite/groups/types.lua +++ b/lua/highlite/groups/types.lua @@ -1,6 +1,6 @@ --- @meta ---- @alias highlite.groups.from_palette.opts.plugins.nvim 'aerial'|'barbar'|'cmp'|'fzf'|'gitsigns'|'indent_blankline'|'lazy'|'leap'|'lsp_signature'|'lspconfig'|'lspsaga'|'mini'|'neotest'|'nvim_tree'|'packer'|'sniprun'|'symbols_outline'|'telescope'|'todo_comments'|'trouble' +--- @alias highlite.groups.from_palette.opts.plugins.nvim 'aerial'|'barbar'|'cmp'|'fzf'|'gitsigns'|'indent_blankline'|'lazy'|'leap'|'lsp_signature'|'lspconfig'|'lspsaga'|'mini'|'neotest'|'nvim_tree'|'packer'|'sniprun'|'symbols_outline'|'telescope'|'todo_comments'|'treesitter_context'|'trouble' --- @alias highlite.groups.from_palette.opts.plugins.vim 'ale'|'coc'|'easymotion'|'fern'|'gitgutter'|'indent_guides'|'jumpmotion'|'nerdtree'|'sandwich'|'signify'|'swap'|'undotree' --- @alias highlite.groups.from_palette.opts.syntax 'coq'|'cpp'|'cs'|'css'|'dart'|'dosini'|'dot'|'git'|'go'|'help'|'html'|'i3config'|'java'|'javascript'|'json'|'lua'|'make'|'man'|'markdown'|'python'|'razor'|'ruby'|'rust'|'scala'|'scss'|'sh'|'solidity'|'sql'|'tex'|'toml'|'vim'|'xdefaults'|'xml'|'xxd'|'yaml'