diff --git a/modules/plugins/notes/neorg/config.nix b/modules/plugins/notes/neorg/config.nix index c28f594f..367f2567 100644 --- a/modules/plugins/notes/neorg/config.nix +++ b/modules/plugins/notes/neorg/config.nix @@ -28,24 +28,7 @@ in { }; pluginRC.neorg = entryAnywhere '' - -- Treesitter configuration - require('nvim-treesitter.configs').setup { - - -- If TS highlights are not enabled at all, or disabled via `disable` prop, - -- highlighting will fallback to default Vim syntax highlighting - highlight = { - enable = true, - -- Required for spellcheck, some LaTex highlights and - -- code block highlights that do not have ts grammar - additional_vim_regex_highlighting = {'neorg'}, - }, - } - - require('neorg').setup{ - ${cfg.setupOpts} - } - - vim.wo.conceallevel = 2 + require('neorg').setup(${toLuaObject cfg.setupOpts}) ''; }; } diff --git a/modules/plugins/notes/neorg/neorg.nix b/modules/plugins/notes/neorg/neorg.nix index 0904cc67..f6ab8aec 100644 --- a/modules/plugins/notes/neorg/neorg.nix +++ b/modules/plugins/notes/neorg/neorg.nix @@ -5,31 +5,30 @@ ... }: let inherit (lib.options) mkEnableOption mkOption; - inherit (lib.types) lines; + inherit (lib.types) submodule listOf str; inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption; in { options.vim.notes.neorg = { enable = mkEnableOption "neorg: Neovim plugin for Neorg"; - setupOpts = mkOption { - type = lines; - default = '' + setupOpts = mkPluginSetupOption "Neorg" { + load = { + "core.defaults" = mkOption { + 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"; + type = submodule { + options = { + enable = mkEnableOption "A wrapper to interface with several different completion engines."; + config = { + disable = mkOption { + type = listOf str; + default = []; + }; + }; + }; + }; + }; + }; }; treesitter = {