shaunsingh / nord.nvim

Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support
GNU General Public License v2.0
804 stars 107 forks source link

update setup (new style) #103

Open mohammadne opened 2 years ago

mohammadne commented 2 years ago

Hi @shaunsingh, first of all thanks for your plugin.

I wonder to know that is it possible to change the plugin of how it'll setup :))

I mean like other themes it's possible to set the colorscheme like:

vim.cmd("colorscheme onedark") -- set colorscheme

and the setup part would be like below:

local exists, nord = pcall(require, "nord")
if not exists then
    return
end

nord.setup({
  -- setups goes here
})

I really don't like how it will be setup with vim globals and rather like to call setup function on it and not the set function.

some examples would be:

reason

the style of setup would break me to have multiple themes in a uniform style and not follows other community themes.

shaunsingh commented 2 years ago

I believe require('nord').set() works (I'll change that require('nord').setup(). the reason it isn't mentioned in the readme is because there was a bug that loaded the theme twice when you called .setup(). Along with revamping a few other things soon, I'll fix that

mohammadne commented 2 years ago

Hi @shaunsingh is there any update?