Skip to content

Commit

Permalink
plugins/nvim-orgmode: init
Browse files Browse the repository at this point in the history
  • Loading branch information
refaelsh authored and khaneliman committed Sep 1, 2024
1 parent f3362d2 commit 2b30ee8
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
./languages/markdown/preview.nix
./languages/nix.nix
./languages/nvim-jdtls.nix
./languages/nvim-orgmode.nix
./languages/openscad.nix
./languages/otter.nix
./languages/parinfer-rust.nix
Expand Down
30 changes: 30 additions & 0 deletions plugins/languages/nvim-orgmode.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
lib,
config,
pkgs,
...
}:
let
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.neovim-plugin.mkNeovimPlugin config {
name = "orgmode";
originalName = "nvim-orgmode";
defaultPackage = pkgs.vimPlugins.orgmode;

maintainers = [ lib.nixvim.maintainers.refaelsh ];

settingsOptions = {
org_agenda_files = defaultNullOpts.mkNullable (with lib.types; either str (listOf str)) "" ''
A path for Org agenda files.
'';
org_default_notes_file = defaultNullOpts.mkStr "" ''
A path to the default notes file.
'';
};

settingsExample = {
org_agenda_files = "~/orgfiles/**/*";
org_default_notes_file = "~/orgfiles/refile.org";
};
}
26 changes: 26 additions & 0 deletions tests/test-sources/plugins/languages/orgmode.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
empty = {
plugins.orgmode.enable = true;
};

default = {
plugins.orgmode = {
enable = true;
settings = {
org_agenda_files = "";
org_default_notes_file = "";
};
};
};

example = {
plugins.orgmode = {
enable = true;

settings = {
org_agenda_files = "~/orgfiles/**/*";
org_default_notes_file = "~/orgfiles/refile.org";
};
};
};
}

0 comments on commit 2b30ee8

Please sign in to comment.