From 286cf1bc7cc665f29d7e981e3c0709ee2a118f81 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Wed, 9 Oct 2024 08:38:31 +0200 Subject: [PATCH] neorg: setupOpts work --- modules/plugins/notes/neorg/config.nix | 6 ++++- modules/plugins/notes/neorg/neorg.nix | 35 +++++++++++++------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/modules/plugins/notes/neorg/config.nix b/modules/plugins/notes/neorg/config.nix index df41cf52..c28f594f 100644 --- a/modules/plugins/notes/neorg/config.nix +++ b/modules/plugins/notes/neorg/config.nix @@ -41,7 +41,11 @@ in { }, } - require('neorg').setup(${toLuaObject cfg.setupOpts}) + require('neorg').setup{ + ${cfg.setupOpts} + } + + vim.wo.conceallevel = 2 ''; }; } diff --git a/modules/plugins/notes/neorg/neorg.nix b/modules/plugins/notes/neorg/neorg.nix index 756c7daa..0904cc67 100644 --- a/modules/plugins/notes/neorg/neorg.nix +++ b/modules/plugins/notes/neorg/neorg.nix @@ -5,32 +5,31 @@ ... }: let inherit (lib.options) mkEnableOption mkOption; - inherit (lib.types) str; + inherit (lib.types) lines; inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption; in { options.vim.notes.neorg = { enable = mkEnableOption "neorg: Neovim plugin for Neorg"; - setupOpts = mkPluginSetupOption "Neorg" { - setup = mkOption { - type = str; - default = '' - load = { - ['core.defaults'] = {}, -- Loads default behaviour - ['core.concealer'] = {}, -- Adds pretty icons to your documents - ['core.export'] = {}, -- Adds export options - ['core.integrations.telescope'] = {}, -- Telescope integration - ['core.dirman'] = { -- Manages Neorg workspaces - config = { - workspaces = { - notes = '~/Documents/neorg', - }, + setupOpts = mkOption { + type = lines; + default = '' + + load = { + ['core.defaults'] = {}, -- Loads default behaviour + ['core.concealer'] = {}, -- Adds pretty icons to your documents + ['core.export'] = {}, -- Adds export options + ['core.integrations.telescope'] = {}, -- Telescope integration + ['core.dirman'] = { -- Manages Neorg workspaces + config = { + workspaces = { + notes = '~/Documents/neorg', }, }, }, - ''; - description = "Neorg configuration"; - }; + }, + ''; + description = "Neorg configuration"; }; treesitter = {