Hard to distinguish the popup window
AlexXi19 opened this issue · 8 comments
Looks like the plugin highlights didn't setup, could be due to:
- You have
theme
option disabled in configuration. - You're using an outdated neovim version (7.2 and below)
- Your colorscheme doesn't provide necessary colors for the plugin, make sure your colorscheme has these highlights:
Normal
,CursorLine
,FloatBorder
,LineNr
, otherwise you'll have to highlight everything yourself.
If none of this helps, make sure to move glance setup
call after you colorscheme installation.
Could you please provide your nvim version and a snippet of your glance setup?
Thanks for the info, I'm on nvim 0.9. and I'm using this theme: https://github.com/projekt0n/github-nvim-theme at the moment. Let me try debugging on my end if i have some time and get back to you.
Hi @DNLHC. Thanks for the plugin, I am really enjoying it.
However, I am experiencing the same issue. The peek window blends too well with the theme. I have tried the following themes:
navarasu/onedark.nvim
marko-cerovac/material.nvim
I've also tried a few different theme modes like brighten
or darken
and still no luck. I am using the default config provided in the README
and it looks like this:
local glance = require('glance')
local actions = glance.actions
glance.setup({
height = 25,
zindex = 45,
detached = true,
detached = function(winid)
return vim.api.nvim_win_get_width(winid) < 100
end,
preview_win_opts = {
cursorline = true,
number = true,
wrap = true,
},
border = {
enable = false,
top_char = '―',
bottom_char = '―',
},
list = {
position = 'right',
width = 0.33,
},
theme = {
enable = true,
mode = 'brighten',
},
mappings = {
list = {
['j'] = actions.next,
['k'] = actions.previous,
['<Down>'] = actions.next,
['<Up>'] = actions.previous,
['<Tab>'] = actions.next_location,
['<S-Tab>'] = actions.previous_location,
['<C-u>'] = actions.preview_scroll_win(5),
['<C-d>'] = actions.preview_scroll_win(-5),
['v'] = actions.jump_vsplit,
['s'] = actions.jump_split,
['t'] = actions.jump_tab,
['<CR>'] = actions.jump,
['o'] = actions.jump,
['<leader>l'] = actions.enter_win('preview'),
['q'] = actions.close,
['Q'] = actions.close,
['<Esc>'] = actions.close,
["<C-q>"] = actions.quickfix,
},
preview = {
['Q'] = actions.close,
['<Tab>'] = actions.next_location,
['<S-Tab>'] = actions.previous_location,
['<leader>l'] = actions.enter_win('list'),
},
},
hooks = {},
folds = {
fold_closed = '',
fold_open = '',
folded = true,
},
indent_lines = {
enable = true,
icon = '│',
},
winbar = {
enable = true,
},
})
I will look into it
@AlexXi19 @kampanosg I was able to reproduce this issue, you could fix it by lazy loading the plugin
with lazy.nvim
:
{
'dnlhc/glance.nvim',
cmd = 'Glance',
config = function()
require('glance').setup({
-- your configuration
})
end,
},
with packer
:
use({
"dnlhc/glance.nvim",
cmd = 'Glance',
config = function()
require('glance').setup({
-- your configuration
})
end,
})
The problem is that your colorscheme is most likely installed after glance setup.
This will lazy-load plugin on command Glance
Should be working as expected now, i would still advise to keep the lazy-load option on.
I'm still seeing this issue even though I'm lazy loading and ensuring that glance is laoding after my colorscheme. I'm using https://github.com/ellisonleao/gruvbox.nvim as my colorscheme, and I'm guesing it just doesn't have the neccesary highlight groups, but I'm not sure.