-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No highlights #21
Comments
By default there are no highlights and by default most TS* highlight are not defined. Try defining these highlights (change the colors to whatever you like):
Or you can use my colorscheme which I just pushed these values for: |
Ah I see! It would be nice to have a default set of highlight as fallback if they are not specified by the user or by the colorscheme. |
@quantum-booty makes sense, I'll add a function which just uses my theme's highlights as the default set 👍 |
closes #21 this commit adds default highlights to calltree. all default highlights can be overwriten. a config option "no_hls" is added to disable highlights all together. Signed-off-by: ldelossa <louis.delos@gmail.com>
closes #21 this commit adds default highlights to calltree. all default highlights can be overwriten. a config option "no_hls" is added to disable highlights all together. Signed-off-by: ldelossa <louis.delos@gmail.com>
add default highlights, give it a try. |
@ldelossa Looks like the default highlights doesn't work for me. I think I figured out why, so in this function: function _setup_default_highlights()
local dark = {
CTBoolean = 'hi CTBoolean guifg=#0087af guibg=None',
CTConstant = 'hi CTConstant guifg=#0087af guibg=None',
CTConstructor = 'hi CTConstructor guifg=#4DC5C6 guibg=None',
CTField = 'hi CTField guifg=#0087af guibg=None',
CTFunction = 'hi CTFunction guifg=#988ACF guibg=None',
CTMethod = 'hi CTMethod guifg=#0087af guibg=None',
CTNamespace = 'hi CTNamespace guifg=#87af87 guibg=None',
CTNumber = 'hi CTNumber guifg=#9b885c guibg=None',
CTOperator = 'hi CTOperator guifg=#988ACF guibg=None',
CTParameter = 'hi CTParameter guifg=#988ACF guibg=None',
CTParameterReference = 'hi CTParameterReference guifg=#4DC5C6 guibg=None',
CTString = 'hi CTString guifg=#af5f5f guibg=None',
CTSymbol = 'hi CTSymbol guifg=#87afd7 gui=underline',
CTSymbolDetail = 'hi CTSymbolDetail ctermfg=024 cterm=italic guifg=#988ACF gui=italic',
CTSymbolJump = 'hi CTSymbolJump ctermfg=015 ctermbg=110 cterm=italic,bold,underline guifg=#464646 guibg=#87afd7 gui=italic,bold',
CTSymbolJumpRefs = 'hi CTSymbolJumpRefs ctermfg=015 ctermbg=110 cterm=italic,bold,underline guifg=#464646 guibg=#9b885c gui=italic,bold',
CTType = 'hi CTType guifg=#9b885c guibg=None',
CTURI = 'hi CTURI guifg=#988ACF guibg=None',
}
local light = {
CTBoolean = 'hi CTBoolean guifg=#005f87 guibg=None',
CTConstant = 'hi CTConstant guifg=#005f87 guibg=None',
CTConstructor = 'hi CTConstructor guifg=#9b885c guibg=None',
CTField = 'hi CTField guifg=#005f87 guibg=None',
CTFunction = 'hi CTFunction guifg=#806CCF guibg=None',
CTMethod = 'hi CTMethod guifg=#005f87 guibg=None',
CTNamespace = 'hi CTNamespace guifg=#87af87 guibg=None',
CTNumber = 'hi CTNumber guifg=#9b885c guibg=None',
CTOperator = 'hi CTOperator guifg=#806CCF guibg=None',
CTParameter = 'hi CTParameter guifg=#806CCF guibg=None',
CTParameterReference = 'hi CTParameterReference guifg=#268889 guibg=None',
CTString = 'hi CTString guifg=#af5f5f guibg=None',
CTSymbol = 'hi CTSymbol guifg=#806CCF gui=underline',
CTSymbolDetail = 'hi CTSymbolDetail ctermfg=024 cterm=italic guifg=#005f87 gui=italic',
CTSymbolJump = 'hi CTSymbolJump ctermfg=015 ctermbg=110 cterm=italic,bold,underline guifg=#464646 guibg=#87afd7 gui=italic,bold',
CTSymbolJumpRefs = 'hi CTSymbolJumpRefs ctermfg=015 ctermbg=110 cterm=italic,bold,underline guifg=#464646 guibg=#9b885c gui=italic,bold',
CTType = 'hi CTType guifg=#268889 guibg=None',
CTURI = 'hi CTURI guifg=#806CCF guibg=None',
}
local bg = vim.api.nvim_get_option("background")
if bg == "dark" then
print("here - dark")
for hl_name, hl in pairs(dark) do
if not vim.fn.hlexists(hl_name) == 0 then
vim.cmd(hl)
end
end
end
if bg == "light" then
for hl_name, hl in pairs(light) do
if vim.fn.hlexists(hl_name) == 0 then
vim.cmd(hl)
end
end
end
end
_setup_default_highlights() looks like this: if not vim.fn.hlexists(hl_name) == 0 then
vim.cmd(hl)
end should be this instead: if vim.fn.hlexists(hl_name) == 0 then
vim.cmd(hl)
end And it would be nice to get rid of the debug print print("here - dark") |
yup! |
Pushed some changes, give it a go. |
Thanks, working now! |
I'm having the same issue, I thought of commenting here yesterday now you beat me to it 😊 Getting the correct highlight color codes returned, but no actual highlighting is happening. I tried to add fixed values for the highlights in the plugins corresponding files instead of using variables, but it looks like there is an issue with the colors getting applied in the panel. I also tried disabling tree sitter highlights to check for conflicts. E.g., one of the goals was to change the indent lines color to something less bright. |
We maybe only doing syntax matches for codicon icons and not nerd icons 😬. Im a bit wrapped up but i should be able to look into this soon. If you want to beat me too it, the issue most likely revolves around this function: litee.nvim/lua/litee/lib/util/window.lua Line 13 in f181c76
|
Unfortunately I can't spot the reason for this problem, so I did some exploratory testing and modifications around the highlight related functions for the last two hours, unfortunately without satisfying results. What I can say is that the highlight groups get set up properly, but they won't get applied to the filetree elements. That is using any of the litee.lib icon sets Following are two mappings that print highlights of the element under cursor and might be of use when debugging highlights. I mapped them to some FKeys or this purpose: local map = vim.keymap.set
-- ...
map( "n", "<F6>", [[:echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" . " FG:" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#")<CR>]])
map("n", "<F7>", "<cmd>TSHighlightCapturesUnderCursor<CR>") |
Configuring diff --git a/lua/config/plugin/litee/setup.lua b/lua/config/plugin/litee/setup.lua
index 2b1a243..98c70ec 100644
--- a/lua/config/plugin/litee/setup.lua
+++ b/lua/config/plugin/litee/setup.lua
@@ -1,4 +1,12 @@
require("litee.lib").setup({
+ tree = {
+ icon_set_custom = {
+ Collapsed = "",
+ Expanded = "",
+ IndentGuide = " ",
+ },
+ icon_set = "nerd",
+ },
panel = {
orientation = "right",
panel_size = math.ceil(vim.api.nvim_get_option("columns") / 4), But it seems I still need to set the require("litee.lib").setup({
tree = {
icon_set_custom = {
Collapsed = "",
Expanded = "",
IndentGuide = " ",
},
icon_set = "nerd",
},
panel = {
orientation = "right",
panel_size = math.ceil(vim.api.nvim_get_option("columns") / 4),
},
})
require("litee.symboltree").setup({
icon_set = "nerd",
hide_cursor = false,
on_open = "panel",
keymaps = { hide = "q" },
})
require("litee.calltree").setup({
icon_set = "nerd",
hide_cursor = false,
on_open = "panel",
keymaps = { hide = "q" },
}) I don't know if this is the expected behavior because in the first place I |
This change is a workaround for [1]. [1]: ldelossa/litee.nvim#21
I tried it with and without treesitter highlights (commented out).
The text was updated successfully, but these errors were encountered: