From 2122a01f99c6da466b8f0f55c965c11a9043d117 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 9 Nov 2024 12:35:44 +0100 Subject: refactor(modules/legacy/conf/nvim): Move to `by-name` --- modules/by-name/nv/nvim/plgs/neorg/default.nix | 70 ++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 modules/by-name/nv/nvim/plgs/neorg/default.nix (limited to 'modules/by-name/nv/nvim/plgs/neorg') diff --git a/modules/by-name/nv/nvim/plgs/neorg/default.nix b/modules/by-name/nv/nvim/plgs/neorg/default.nix new file mode 100644 index 00000000..cf046e06 --- /dev/null +++ b/modules/by-name/nv/nvim/plgs/neorg/default.nix @@ -0,0 +1,70 @@ +{ + config, + lib, + pkgsStable, + ... +}: let + cfg = config.soispha.programs.nvim; +in { + home-manager.users.soispha.programs.nixvim.plugins = lib.mkIf cfg.enable { + cmp.settings.sources = [ + {name = "neorg";} + ]; + + neorg = { + package = pkgsStable.vimPlugins.neorg; + enable = true; + lazyLoading = true; + + modules = { + "core.defaults" = { + __empty = null; + }; + "core.esupports.metagen".config = { + type = "auto"; + }; + "core.journal".config = { + workspace = "journal"; + }; + "core.keybinds".config = { + hook = { + __raw = '' + function(keybinds) + -- remap the looking glas to the same key, femaco is also mapped to. + keybinds.remap_event("norg", "n", "cc", "core.looking-glass.magnify-code-block") + + keybinds.remap_event("norg", "n", "", "core.integrations.telescope.find_linkable") + keybinds.remap_event("norg", "i", "", "core.integrations.telescope.insert_link") + end, + ''; + }; + }; + "core.completion".config = { + engine = "nvim-cmp"; + }; + "core.concealer".config = { + __empty = null; + }; + "core.dirman".config = { + workspaces = { + general = "~/repos/notes/general"; + journal = "~/repos/notes/journal"; + projects = "~/repos/notes/projects"; + }; + }; + "core.export".config = { + __empty = null; + }; + "core.integrations.telescope".config = { + __empty = null; + }; + + # TODO: Add this when the nvim version in nixpkgs is >= 0.10 <2023-08-29> + # + # "core.ui.calendar".config = { + # __empty = null; + # }; + }; + }; + }; +} -- cgit 1.4.1