ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.89k stars 453 forks source link

lualine 提示 invalid key #408

Closed nkta3m closed 1 year ago

nkta3m commented 1 year ago

Version confirmation

Neovim version

NVIM v0.8.2

Operating system/version

Windows 10

Terminal name/version

Alacritty

$TERM environment variable

No response

Branch info

main (Default/Latest)

Fetch Preferences

HTTPS (use_ssh = false)

How to reproduce the issue

更换lualine主题

Expected behavior

不报错

Actual behavior

更换lualine的主题后(ui/config 249 line)

打开文件提示如下: packer.nvim: Error running config for lualine.nvim: ......utils/init.lua:62 invalid key

如果把ui/config的 302--307注释掉,就不会报错了 2023-01-06 10_21_36-Window

Additional information

No response

CharlesChiuGit commented 1 year ago

This is probably depends on your colorscheme which doesn't have this highlight group. So u can do 21 things to solve it:

  1. use this repo's colorscheme 2. define the highlight group yourself., this might be wrong, since we have define a default color for it.

You should probably check if you're on the latest commit.

Jint-lzxy commented 1 year ago

Cannot reproduce. This should be fixed by #405. Which theme did you switch to for lualine and which colorscheme did you use?

nkta3m commented 1 year ago

i set lualine theme to carbonfox

Jint-lzxy commented 1 year ago
lualine-warning

Is this the theme of another colorscheme? Loos like lualine does not have this scheme built in. I tried to search on Google and got EdenEast/lightfox.nvim.

nkta3m commented 1 year ago

carbonfox is part of https://github.com/EdenEast/nightfox.nvim

Jint-lzxy commented 1 year ago

Can reproduce. Looks like there's a problem working with linked highlight groups. I will rewrite this function (for merging highlight groups) later. Now you can comment out these lines as a temporary workaround 👍

nkta3m commented 1 year ago

ok

Jint-lzxy commented 1 year ago

@nkta3m #409 should be able to address this problem. You can test whether this issue is resolved after the PR is merged.

nkta3m commented 1 year ago

sorry, 我刚才弄错了,问题依然存在,提示init.lua:97 invalid key

Jint-lzxy commented 1 year ago

@nkta3m This PR has not been merged yet. If you want to test it now, you can clone my branch:


demo

I did some tests, and there were no errors when using the default nightfox colorscheme

ayamir commented 1 year ago

@nkta3m This PR has not been merged yet. If you want to test it now, you can clone my branch:

  • ssh: git clone git@github.com:Jint-lzxy/nvimdots.git && cd nvimdots && git checkout utils-fix
  • https: git clone https://github.com/Jint-lzxy/nvimdots.git && cd nvimdots && git checkout utils-fix
  • github CLI: gh pr checkout 409
demo

I did some tests, and there were no errors when using the default nightfox colorscheme

In other way, no need to clone, just add you repo as a remote origin.

git remote add jint git@github.com:Jint-lzxy/nvimdots.git
git fetch jint
git checkout utils-fix
nkta3m commented 1 year ago

我测试也OK了,没有报错了,👍