Open NotAShelf opened 1 year ago
You can cofigure line_opacity
per mode, set it to 0 to remove the background
require('modes').setup({
line_opacity = {
visual = 0,
},
})
Or you can override ModesVisual
or ModesVisualXXX
highlight group where XXX
is
CursorLine
CursorLineNr
CursorLineSign
CursorLineFold
Visual
Configuring line_opacity is the first thing I've tried, it results in a black background on VISUAL mode selections.
Update: seems to be exclusive to the Catppuccin theme.
Can you provide reproduction steps with minimal config? By minimal config I mean no package manager, just packadd
it manually
I can't reproduce your issue with the following config
vim.o.termguicolors = true
vim.cmd.packadd("modes.nvim")
vim.cmd.colorscheme("catppuccin") -- assuming you cloned the theme as `start` package
require("modes").setup({
line_opacity = {
visual = 0,
},
})
That might be a little tricky, given I use Nix to manage plugins for me.
But I think a minimal config would look like a combination of :
set termguicolors
set t_Co=256
require('modes').setup({
set_cursorline = false,
colors = {
copy = "#f5c359",
delete = "#c75c6a",
insert = "#78ccc5",
visual = "#9745be",
},
})
-- Catppuccin theme
require('catppuccin').setup {
flavour = "mocha",
transparent_background = false,
integrations = {
nvimtree = {
enabled = true,
transparent_panel = false,
show_root = true,
},
hop = true,
gitsigns = true,
telescope = true,
treesitter = true,
ts_rainbow = true,
fidget = true,
alpha = true,
leap = true,
markdown = true,
noice = true,
notify = true, -- nvim-notify
which_key = true
},
}
-- setup must be called before loading
vim.cmd.colorscheme "catppuccin"
Those are my configured defaults, minus the
line_opacity = {
visual = 0,
},
part which changes the visual mode background to black.
I still can't reproduce your issue with your config
I've experienced different results in different terminals (where footerm shows black, but kitty shows a darker shade of purple for visual)
Perhaps it is a terminal thing, which terminal are you testing with?
Edit: turned out to be unrelated, I remain clueless
Perhaps it is a terminal thing, which terminal are you testing with?
I'm using Alacritty
Can you provide a screenshot of what it looks like, and what do you expect it to look like?
Are you using tmux?
Perhaps it is a terminal thing, which terminal are you testing with?
I'm using Alacritty
Can you provide a screenshot of what it looks like, and what do you expect it to look like?
With line_opacity set to 0, here is what it looks like on catppuccin:
vs. the same selection, in neovim's built-in desert theme:
Are you using tmux?
I'm not, it's just a raw terminal window.
@NotAShelf Do other non-built-in themes behave like catppuccin?
Can you reproduce your issue with the following config
-- minimal.lua
vim.o.termguicolors = true
vim.cmd.packadd("modes.nvim")
vim.cmd.colorscheme("catppuccin") -- assuming you cloned the theme as `start` package
require("modes").setup({
line_opacity = {
visual = 0,
},
})
with nvim --clean -S minimal.lua -- minimal.lua
command?
The thing is it seems you disabled the cursor line with set_cursorline = false
, so the expected behavior should be no cursor line at all
Do other non-built-in themes behave like catppuccin?
no, none of the built-in themes behave like catppuccin, but the "default" theme does
Can you reproduce your issue with the following config
I cannot.
Looks like catppuccin has something about compile-thing, do you think that's the cause of your issue? Have you tried asking the catppuccin people?
I am not sure if the problem is with the catppuccin theme itself, but how the background is drawn by neovim since the issue also occurs on the default theme of neovim.
But if you can't reproduce your issue with nvim --clean
, it's most likely from your config
That is a fair point.
I believe you could overwrite ModesVisual*
highlight groups to be your theme's background instead of transparent. :hi ModesVisual<tab>
should show the relevant group names.
Hello! I would like to remove the colored backgrounds from modes, especially in visual. Is it possible?
edit: to clarify, I just would like it to make it possible that modes.nvim does not alter colors for modes like v-snip, because it creates a conflict with the implementation of configurable themes in my setup