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

bug: Wrong when use nekonight #3

Open
4 tasks done
tan-wei opened this issue Jan 8, 2025 · 7 comments
Open
4 tasks done

bug: Wrong when use nekonight #3

tan-wei opened this issue Jan 8, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@tan-wei
Copy link

tan-wei commented Jan 8, 2025

Did you check docs and existing issues?

  • I have read all the nekonight docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of nekonight
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.11.0-dev-1490+ge27f7125d6

Operating system/version

archlinux

Describe the bug

A simple use will cause error:

require("nekonight").setup()

colorscheme nekonight

Then neovim will report error:

E5113: Error while calling lua chunk: .../share/nvim/lazy/nekonight/lua/nekonight/colors/init.lua:8: attempt to concatenate local 'style' (a boolean value)
stack traceback:
	.../share/nvim/lazy/nekonight/lua/nekonight/colors/init.lua:8: in function '__index'
	.../share/nvim/lazy/nekonight/lua/nekonight/colors/init.lua:18: in function 'setup'
	....local/share/nvim/lazy/nekonight/lua/nekonight/theme.lua:9: in function 'load'
	...se/.local/share/nvim/lazy/nekonight/colors/nekonight.lua:1: in main chunk

Steps To Reproduce

require("nekonight").setup()

colorscheme nekonight

Expected Behavior

No error

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 = {
    "BrunoCiccarino/nekonight",
    lazy = true,
    config = true
  },
})
@tan-wei tan-wei added the bug Something isn't working label Jan 8, 2025
@tan-wei
Copy link
Author

tan-wei commented Jan 8, 2025

But use ones that have suffix vairant will not cause error:

colorscheme nekonight-moon

@BrunoCiccarino
Copy link
Owner

To download the theme you have to set lazy to false, otherwise this may interfere with the functioning of the theme.

@tan-wei
Copy link
Author

tan-wei commented Jan 9, 2025

Thanks for your colorscheme. But I don't think it is related to lazy = true. After I force lazy = false, it still occurs.

@BrunoCiccarino
Copy link
Owner

Thanks for your colorscheme. But I don't think it is related to lazy = true. After I force lazy = false, it still occurs.

I tried to reproduce this afternoon and I couldn't, maybe it's the syntax when choosing colorscheme, the syntax I use is this
vim.cmd "colorscheme nekonight-deep-ocean"

I'm assuming you're on neovim, right?

@tan-wei
Copy link
Author

tan-wei commented Jan 9, 2025

Yes I use neovim.

And as I said before, only colorscheme nekonight will report error, and other variants with suffix such as colorscheme nekonight-deep-ocean works well.

So I guess nekonight is a special one which will require setup table style key to generate the suffix ones. Does it right?

@BrunoCiccarino
Copy link
Owner

Yes I use neovim.

And as I said before, only colorscheme nekonight will report error, and other variants with suffix such as colorscheme nekonight-deep-ocean works well.

So I guess nekonight is a special one which will require setup table style key to generate the suffix ones. Does it right?

the base of this theme is from tokyo night, I never tried to use nekonight without a variant because I always imagined it was a module so that I could call other themes... So I can't tell you, it's written there in the code

style = vim.o.background == "light" and "day"

So I assume it's because your editor's background is set to dark, so it might not be working

@tan-wei
Copy link
Author

tan-wei commented Jan 10, 2025

Yes, I always use dark themes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants