nvim-colorizer.lua
nvim-colorizer.lua copied to clipboard
Migrate commands definition inside setup()
With modern package managers disabling built in commands is awkward and undocumented. This PR moves the definition of colorizer commands into the setup function.
Example of disabling builtin commands currently
-- lazy.nvim
require({
{
'NvChad/nvim-colorizer.lua',
init = function()
vim.g.loaded_colorizer = 1
end,
opts = {}
}
})
-- packer
use {
'NvChad/nvim-colorizer.lua',
setup = function()
require('colorizer').setup()
end,
config = function()
vim.g.loaded_colorizer = 1
end,
}
With this PR disabling builtin commands can be done as easy as
-- lazy.nvim
require({
{
'NvChad/nvim-colorizer.lua',
opts = {
default_commands = false
}
}
})
-- packer
use {
'NvChad/nvim-colorizer.lua',
setup = function()
require('colorizer').setup({
default_commands = false
})
end,
}