zenbones-theme / zenbones.nvim

🪨 A collection of contrast-based Vim/Neovim colorschemes
MIT License
689 stars 48 forks source link

Error if reloading/resourcing init.lua #16

Closed motorto closed 2 years ago

motorto commented 2 years ago

If I open my init.lua file and reload it with source $MYVIMRC

I get the following warning:

Error detected while processing /var/home/cerqueira/.var/app/io.neovim.nvim/config/nvim/init.lua:
E5113: Error while calling lua chunk: ...e/cerqueira/.var/app/io.neovim.nvim/config/nvim/init.lua:25: Vim(lua):E5108: Error executing lua .../data
/nvim/site/pack/packer/start/lush.nvim/lua/lush.lua:64: Vim:zenbones_dim_noncurrent_window is replaced by zenbones_darken_noncurrent_window
Press ENTER or type command to continue

Don't know if it it has to do with lush or with this theme. But here is my config related to zenbones:

    use {
        'mcchrish/zenbones.nvim',
        requires = {'rktjmp/lush.nvim'},
        config = function()
            vim.cmd([[
            let g:zenbones_lightness = 'bright'
            let g:zenflesh_darkness = 'stark'
            let g:zenbones_solid_vert_split = 1
            let g:zenflesh_solid_vert_split = 1
            let g:zenbones_dim_noncurrent_window = 1 
            let g:zenflesh_lighten_noncurrent_window = 1
            let g:zenbones_italic_comments = 1
            let g:zenflesh_italic_comments = 1
            ]])
        end
    }
mcchrish commented 2 years ago

I renamed some config for consistency.

The error shows a possible fix:

Vim:zenbones_dim_noncurrent_window is replaced by zenbones_darken_noncurrent_window

Hope that helps.

mcchrish commented 2 years ago

Also some tip: you don't need to wrap the config in vim.cmd, you can just set them in plain lua:

vim.g.zenflesh_darkness = 'stark'
vim.g.zenbones_solid_vert_split = true

Also note that 1 in not the proper value, better to set it to true in lua or v:true in vimscript.

motorto commented 2 years ago

Thanks for the lua tip. Appreciate your help, sorry for opening this useless issue ... I will close this issue.

On Fri, Oct 22 2021 at 01:03:09 AM -0700, Michael Chris Lopez @.***> wrote:

Also some tip: you don't need to wrap the config in vim.cmd, you can just set them in plain lua:

vim.g.zenflesh_darkness = 'stark' vim.g.zenbones_solid_vert_split = true Also note that 1 in not the proper value, better to set it to true in lua or v:true in vimscript.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mcchrish/zenbones.nvim/issues/16#issuecomment-949384652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRTQPJMCWURCPB6DVTW7QTUIELD3ANCNFSM5GP3W67Q. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.