mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 12:45:57 +01:00
colorizer: revert setupOpts name changes
This commit is contained in:
parent
2c37513012
commit
2cec6178ab
2 changed files with 7 additions and 6 deletions
|
@ -27,23 +27,24 @@
|
|||
};
|
||||
in {
|
||||
imports = [
|
||||
(mkRenamedOptionModule ["vim" "ui" "colorizer" "options"] ["vim" "ui" "colorizer" "setupOpts" "defaultOptions"])
|
||||
(mkRenamedOptionModule ["vim" "ui" "colorizer" "filetypes"] ["vim" "ui" "colorizer" "setupOpts" "filetypes"])
|
||||
(mkRenamedOptionModule ["vim" "ui" "colorizer" "setupOpts" "defaultOptions"] ["vim" "ui" "colorizer" "options"])
|
||||
(mkRenamedOptionModule ["vim" "ui" "colorizer" "setupOpts" "filetypes"] ["vim" "ui" "colorizer" "filetypes"])
|
||||
];
|
||||
|
||||
options.vim.ui.colorizer = {
|
||||
enable = mkEnableOption "color highlighting [nvim-colorizer.lua]";
|
||||
|
||||
defaultOptions = mkOption {
|
||||
# colorizer has a non-standard setup function (takes two args), so we're not using setupOpts
|
||||
options = mkOption {
|
||||
description = ''
|
||||
Default options that apply to all filetypes. Filetype specific settings from
|
||||
[filetypeSettings](#opt-vim.ui.colorizer.filetypeSettings) take precedence.
|
||||
[filetypes](#opt-vim.ui.colorizer.filetypes) take precedence.
|
||||
'';
|
||||
default = {};
|
||||
type = settingSubmodule;
|
||||
};
|
||||
|
||||
filetypeOptions = mkOption {
|
||||
filetypes = mkOption {
|
||||
description = "Filetype specific settings";
|
||||
default = {};
|
||||
type = submodule {
|
||||
|
|
|
@ -15,7 +15,7 @@ in {
|
|||
];
|
||||
|
||||
vim.luaConfigRC.colorizer = entryAnywhere ''
|
||||
require('colorizer').setup(${toLuaObject cfg.filetypeOptions}, ${toLuaObject cfg.defaultOptions})
|
||||
require('colorizer').setup(${toLuaObject cfg.filetypes}, ${toLuaObject cfg.options})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue