folke / tokyonight.nvim

🏙 A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins. Includes additional themes for Kitty, Alacritty, iTerm and Fish.
Apache License 2.0
6.44k stars 433 forks source link

bug: a g:terminal_color_13 not exist error when using tokyonight #608

Closed leoatchina closed 4 months ago

leoatchina commented 4 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.10

Operating system/version

win10/ubuntu22.04

Describe the bug

vim-plug is my (nev)vim plugins manager, and I have installed tokyonight.nvim and wrote colorscheme tokynight in neovim's init.vim, when nvim started up, an error message appeared:

Error detected while processing C:\Users\LEO\.leovim\conf.d\plugin\schemes-status.vim[312]..ColorScheme Autocommands for "*"..function glyph_palette#defaults#highlight[4]..
<lambda>3:
line    1:
E121: Undefined variable: g:terminal_color_13
Press ENTER or type command to continue

Steps To Reproduce

  1. use vim-plug
  2. install tokyonight
  3. add colorschem tokyonight in init.vim

Expected Behavior

It seams to be glyph_pallete related bug, I have found solution to suppress the error message, just set g:terminal_color_13 before colorscheme command, even an empty string

        let g:terminal_color_13 = ''
        colorscheme tokyonight

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    -- add any other plugins here
  },
})
folke commented 4 months ago

Wrong repo https://github.com/ghifarit53/tokyonight-vim