craftzdog / solarized-osaka.nvim

🏯 A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins.
Apache License 2.0
650 stars 29 forks source link

bug: colors.terminal_black and colors.fg_dark are not set properly #18

Open phongnh opened 6 months ago

phongnh commented 6 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.9.5

Operating system/version

Sonoma 14.3.1

Describe the bug

I'm using https://github.com/craftzdog/solarized-osaka.nvim with https://github.com/lambdalisue/glyph-palette.vim.

glyph-palette.vim assumes that if g:terminal_color_0 exists, other colors exist too (color: 0-15).

With this default setup, g:terminal_color_7 and g:terminal_color_8 variables are missing because colors.terminal_black and colors.fg_dark are not set properly and they return nil on setup.

require("solarized-osaka").setup({})

I'm not sure this behavior maybe affect to other highlighting function or not.

image

Steps To Reproduce

Just start nvim with default solarized-osaka setup.

Expected Behavior

I think g:terminal_color_7 and g:terminal_color_8 variables should be set.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "craftzdog/solarized-osaka.nvim",
  "lambdalisue/glyph-palette.vim",
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("solarized-osaka")
-- add anything else here