Compare commits

..

1 commit

Author SHA1 Message Date
Soliprem
671d93981e
Merge eb983c8560 into ef413736e9 2024-10-09 06:52:09 +00:00
2 changed files with 37 additions and 19 deletions

View file

@ -28,7 +28,24 @@ in {
}; };
pluginRC.neorg = entryAnywhere '' 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
''; '';
}; };
} }

View file

@ -5,30 +5,31 @@
... ...
}: let }: let
inherit (lib.options) mkEnableOption mkOption; inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) submodule listOf str; inherit (lib.types) lines;
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption; inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
in { in {
options.vim.notes.neorg = { options.vim.notes.neorg = {
enable = mkEnableOption "neorg: Neovim plugin for Neorg"; enable = mkEnableOption "neorg: Neovim plugin for Neorg";
setupOpts = mkPluginSetupOption "Neorg" { setupOpts = mkOption {
load = { type = lines;
"core.defaults" = mkOption { default = ''
default = {};
type = submodule { load = {
options = { ['core.defaults'] = {}, -- Loads default behaviour
enable = mkEnableOption "A wrapper to interface with several different completion engines."; ['core.concealer'] = {}, -- Adds pretty icons to your documents
['core.export'] = {}, -- Adds export options
['core.integrations.telescope'] = {}, -- Telescope integration
['core.dirman'] = { -- Manages Neorg workspaces
config = { config = {
disable = mkOption { workspaces = {
type = listOf str; notes = '~/Documents/neorg',
default = []; },
}; },
}; },
}; },
}; '';
}; description = "Neorg configuration";
};
}; };
treesitter = { treesitter = {