Closed gennaro-tedesco closed 1 year ago
Can you provide the minimal configuration that you're using to test so that I can reproduce? Should be easy to track down the issue with
I have reduced it to the following minimal configuration:
call plug#begin('~/.config/nvim/plugged')
Plug 'rcarriga/nvim-notify'
Plug 'lifepillar/vim-solarized8'
call plug#end()
" colour scheme
set termguicolors
set background=dark
colorscheme solarized8_flat
and with notify setup being
notify.setup({
timeout = 5000,
render = "minimal",
stages = "fade",
})
Do you think it can be a matter of terminal emulator as well?
That's not a minimal init file
I can't reproduce with this
nvim --clean -u minimal.lua
-- ignore default config and plugins
vim.opt.runtimepath:remove(vim.fn.stdpath("config"))
vim.opt.packpath:remove(vim.fn.stdpath("data") .. "/site")
-- append test directory
local test_dir = "/tmp/nvim-config"
vim.opt.runtimepath:append(vim.fn.expand(test_dir))
vim.opt.packpath:append(vim.fn.expand(test_dir))
-- install packer
local install_path = test_dir .. "/pack/packer/start/packer.nvim"
local install_plugins = false
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
vim.cmd("packadd packer.nvim")
install_plugins = true
end
local packer = require("packer")
packer.init({
package_root = test_dir .. "/pack",
compile_path = test_dir .. "/plugin/packer_compiled.lua",
})
packer.startup(function(use)
use("wbthomason/packer.nvim")
use({
"rcarriga/nvim-notify",
config = function()
require("notify").setup({
timeout = 5000,
render = "minimal",
stages = "fade",
})
end,
})
use({
"lifepillar/vim-solarized8",
config = function()
vim.cmd([[colorscheme solarized8_flat]])
end,
})
if install_plugins then
packer.sync()
end
end)
vim.opt.termguicolors = true
vim.opt.background = "dark"
Interestingly enough I am observing the following:
packer
as plugin manager to set up the configuration then the problem disappearsvim-plug
(which I was using) the problem persists.Perhaps packer
defers some settings (i. e. termguicolors
) before/after some calls (don't know exactly) and vim-plug
doesn't, which is why in the former case they are fine and in the latter they are not? 🤔
Packer works by adding a file to the runtimepath that is loaded after the init.lua so the entire init file is run before any plugin config, whereas I believe vim-plug will run the plugin configs as they are specified in the init so yes it is likely an ordering issue. I'd say try setting termguicolors at the start of your init file and see if that solves it
You are perfectly right: setting set termguicolors
at the very beginning of the init file fixed it. I didn't know how these settings are added to the runtime, great to understand it now, thank you!
Somewhat related to https://github.com/rcarriga/nvim-notify/issues/122: in correspondence of styles
fade
andfade_in_slide_out
I get the exceptionalthough the variable
termguicolors
is set.and
I am running nvim on iTerm2 with
zsh
(if it matters), and I get the error even with a minimal configuration for notify without any other plugin (except my colorscheme).How can I debug the error to provide more details?