Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when setting colorscheme to one-nvim #23

Open
chucktuffli opened this issue Jul 31, 2024 · 1 comment
Open

Error when setting colorscheme to one-nvim #23

chucktuffli opened this issue Jul 31, 2024 · 1 comment

Comments

@chucktuffli
Copy link

NVIM v0.10.1
Ubuntu 22.04

Running :colorscheme one-nvim generates the following error message:

Error detected while processing /home/tuffli/.local/share/nvim/lazy/one-nvim/colors/one-nvim.vim:
line  718:
E5108: Error executing lua [string ":lua"]:712: loop or previous error loading module 'one-nvim'
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:712: in main chunk
Press ENTER or type command to continue
@kah-ell
Copy link

kah-ell commented Nov 1, 2024

Depending on how desperate you are to use this colorscheme, you can fix it somewhat.

This is were it breaks apart in Neovim:

local _USE_HEX = go.termguicolors
local _USE_256 = tonumber(go.t_Co) > 255     -- nvim doesn't know about vim.go.t_Co	
    or string.find(vim.env.TERM, '256')      --      (see :help t_xx)

If you know your terminal supports TrueColor (the hexcode colors like #BADA55), just delete the last two lines above (beginning with local _USE_256... and replace it with local _USE_256 = false. This breaks detection on non-Truecolor terminals, but most modern terminals (kitty, wezterm, konsole, ...) support it by now anyway.

If your term only supports 256 colors, instead replace the lines with a local _USE_256 = true.

It's going to blow up if you update the plugin, but for a quick fix and to check out the colorscheme it should be ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants