tokyonight.nvim icon indicating copy to clipboard operation
tokyonight.nvim copied to clipboard

Neovim dashboard disappear after 0.5 seconds

Open huyvohcmc opened this issue 4 years ago • 5 comments

nvim version: 0.6.0 tokyonight version: latest

vim.g.tokyonight_style = 'night'
vim.g.tokyonight_sidebars = { "qf", "vista_kind", "terminal", "packer" }
vim.g.tokyonight_dark_sidebar = true
vim.g.tokyonight_dark_float = true
vim.g.tokyonight_colors = {
  bg_sidebar = '#1a1b26',
}

vim.cmd[[colorscheme tokyonight]]

link to my config

https://user-images.githubusercontent.com/17645203/144701279-e84ca628-6aaa-4c7e-aa43-a29c5298656f.mov

huyvohcmc avatar Dec 04 '21 07:12 huyvohcmc

I get the same.

My hunch is that this is the culprit: https://github.com/folke/tokyonight.nvim/blob/a5b3cbe750ed6a05a018ac81782bb01de512a6c9/lua/tokyonight/util.lua#L144

IIRC, autocmd ColorScheme forces a redraw that will hide the dashboard/default neovim banner.

Not sure what a fix would look like, but I think this does prevent plugins like alpha.nvim and nvim-dashboard from working correctly.

jsec avatar Dec 04 '21 17:12 jsec

I can confirm this issue

However, nvim-dashboard works just fine.

rewhile avatar Dec 15 '21 09:12 rewhile

I'm using nvim-dashboard together with TokyoNight without any issues.

@tuwuna where do you see this issue?

@jsec I don't think it has anything to do with that. That code is there simply to remove TN autocommands when switching to another colorscheme. Cleanup.

folke avatar Dec 16 '21 16:12 folke

@folke ahh ok. Thanks for the correction. Love the scheme btw.

jsec avatar Dec 16 '21 18:12 jsec

@folke Dashboard flash without using a dashboard plugin, as shown in OP's issue report.

rewhile avatar Dec 16 '21 19:12 rewhile