diff --git a/modules/plugins/notes/neorg/config.nix b/modules/plugins/notes/neorg/config.nix index 367f2567..c28f594f 100644 --- a/modules/plugins/notes/neorg/config.nix +++ b/modules/plugins/notes/neorg/config.nix @@ -28,7 +28,24 @@ in { }; pluginRC.neorg = entryAnywhere '' - require('neorg').setup(${toLuaObject cfg.setupOpts}) + -- 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 ''; }; } diff --git a/modules/plugins/notes/neorg/neorg.nix b/modules/plugins/notes/neorg/neorg.nix index f6ab8aec..0904cc67 100644 --- a/modules/plugins/notes/neorg/neorg.nix +++ b/modules/plugins/notes/neorg/neorg.nix @@ -5,30 +5,31 @@ ... }: let inherit (lib.options) mkEnableOption mkOption; - inherit (lib.types) submodule listOf 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" { - load = { - "core.defaults" = mkOption { - default = {}; + setupOpts = mkOption { + type = lines; + default = '' - type = submodule { - options = { - enable = mkEnableOption "A wrapper to interface with several different completion engines."; - config = { - disable = mkOption { - type = listOf 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', + }, + }, + }, + }, + ''; + description = "Neorg configuration"; }; treesitter = {