navarasu / onedark.nvim

One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
MIT License
1.61k stars 164 forks source link

How to change the style with variable? #50

Closed LamprosPitsillos closed 2 years ago

LamprosPitsillos commented 2 years ago

https://user-images.githubusercontent.com/61395246/148703419-7dd09a67-d2a7-47a3-b280-6f5919cf505a.mp4

xeluxee commented 2 years ago

Due to a Neovim bug with lua and global variables you can't directly edit fields of global dictionaries. I'd suggest you to use setup() function:

require('onedark').setup({style = 'darker'})
require('onedark').load()
navarasu commented 2 years ago

@xeluxee
require('onedark').setup({style = 'darker'}) - Will this update entire option or updates only style param?

xeluxee commented 2 years ago

require('onedark').setup({style = 'darker'}) - Will this update entire option or updates only style param?

It updates only style field because vim.tbl_deep_extend is used