From 263b6a2a08be5c9f94103c10836a301a72d4f522 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Thu, 18 Apr 2024 00:57:36 -0700 Subject: [PATCH] Neovim, add vimwiki extension --- hmModules/apps/neovim/default.nix | 20 +++++++++++++++++++- systems/pan/default.nix | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/hmModules/apps/neovim/default.nix b/hmModules/apps/neovim/default.nix index 4407176..ecfb29b 100644 --- a/hmModules/apps/neovim/default.nix +++ b/hmModules/apps/neovim/default.nix @@ -18,6 +18,7 @@ fzf.enable = lib.mkEnableOption "Enables telescope-fzf"; }; treesitter.enable = lib.mkEnableOption "Enables treesitter"; + wiki.enable = lib.mkEnableOption "Enables a wiki"; }; }; @@ -89,7 +90,24 @@ nix-pkg = lopts cfgl.nix.enable (with pkgs.vimPlugins; [ vim-nix ]); - in comments ++ fugitive ++ luasnip-pkg ++ lualine ++ nix-pkg; + + wiki = lopts cfgp.wiki.enable (with pkgs.vimPlugins; [ + { + plugin = vimwiki; + type = "lua"; + config = '' + vim.g.vimwiki_list = { + { + path = '${config.xdg.userDirs.documents}/wiki', + links_space_char = '_', + ext = '.md', + syntax = 'markdown', + } + } + ''; + } + ]); + in comments ++ fugitive ++ luasnip-pkg ++ lualine ++ nix-pkg ++ wiki; }; }; } diff --git a/systems/pan/default.nix b/systems/pan/default.nix index 7025f6d..7910e57 100644 --- a/systems/pan/default.nix +++ b/systems/pan/default.nix @@ -43,6 +43,7 @@ fzf.enable = true; }; treesitter.enable = true; + wiki.enable = true; }; lf.enable = true;