mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 14:55:59 +01:00
feat(orgmode): custom setup
This commit is contained in:
parent
e5fba51877
commit
2feaadc266
2 changed files with 22 additions and 16 deletions
|
@ -6,6 +6,7 @@
|
|||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.binds) pushDownDefault;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.notes.orgmode;
|
||||
in {
|
||||
|
@ -37,10 +38,7 @@ in {
|
|||
},
|
||||
}
|
||||
|
||||
require('orgmode').setup({
|
||||
org_agenda_files = ${cfg.orgAgendaFiles},
|
||||
org_default_notes_file = '${cfg.orgDefaultNotesFile}',
|
||||
})
|
||||
require('orgmode').setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,24 +4,32 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) str;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.modules) mkRenamedOptionModule;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) str listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
|
||||
in {
|
||||
imports = [
|
||||
(mkRenamedOptionModule ["vim" "notes" "orgmode" "orgAgendaFiles"] ["vim" "notes" "orgmode" "setupOpts" "org_agenda_files"])
|
||||
(mkRenamedOptionModule ["vim" "notes" "orgmode" "orgDefaultNotesFile"] ["vim" "notes" "orgmode" "setupOpts" "org_default_notes_file"])
|
||||
];
|
||||
|
||||
options.vim.notes.orgmode = {
|
||||
enable = mkEnableOption "nvim-orgmode: Neovim plugin for Emac Orgmode. Get the best of both worlds";
|
||||
|
||||
orgAgendaFiles = mkOption {
|
||||
type = str;
|
||||
default = "{'~/Documents/org/*', '~/my-orgs/**/*'}";
|
||||
setupOpts = mkPluginSetupOption "Orgmode" {
|
||||
org_agenda_files = mkOption {
|
||||
type = listOf str;
|
||||
default = ["~/Documents/org/*" "~/my-orgs/**/*"];
|
||||
description = "List of org files to be used as agenda files.";
|
||||
};
|
||||
|
||||
orgDefaultNotesFile = mkOption {
|
||||
org_default_notes_file = mkOption {
|
||||
type = str;
|
||||
default = "~/Documents/org/refile.org";
|
||||
description = "Default org file to be used for notes.";
|
||||
};
|
||||
};
|
||||
|
||||
treesitter = {
|
||||
enable = mkEnableOption "Orgmode treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||
|
|
Loading…
Reference in a new issue