File tree 1 file changed +15
-12
lines changed
1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change 1
1
{ catppuccinLib } :
2
- {
3
- config ,
4
- lib ,
5
- ...
6
- } :
7
-
2
+ { config , lib , ... } :
8
3
let
9
4
cfg = config . catppuccin . nvim ;
10
- in
11
5
6
+ defaultConfig = {
7
+ compile_path = lib . generators . mkLuaInline "compile_path" ;
8
+ flavour = cfg . flavor ;
9
+ } ;
10
+ in
12
11
{
13
- options . catppuccin . nvim = catppuccinLib . mkCatppuccinOption { name = "neovim" ; } ;
12
+ options . catppuccin . nvim = catppuccinLib . mkCatppuccinOption { name = "neovim" ; } // {
13
+ settings = lib . mkOption {
14
+ description = "Extra settings that will be passed to the setup function." ;
15
+ default = { } ;
16
+ type = lib . types . submodule { freeformType = lib . types . attrsOf lib . types . anything ; } ;
17
+ apply = lib . recursiveUpdate defaultConfig ;
18
+ } ;
19
+ } ;
14
20
15
21
imports = catppuccinLib . mkRenamedCatppuccinOptions {
16
22
from = [
32
38
vim.fn.mkdir(compile_path, "p")
33
39
vim.opt.runtimepath:append(compile_path)
34
40
35
- require("catppuccin").setup({
36
- compile_path = compile_path,
37
- flavour = "${ cfg . flavor } ",
38
- })
41
+ require("catppuccin").setup(${ lib . generators . toLua { } cfg . settings } )
39
42
40
43
vim.api.nvim_command("colorscheme catppuccin")
41
44
EOF
You can’t perform that action at this time.
0 commit comments