From c5da58fc3b3160512270bf3b403418496dab4429 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 19 Jul 2024 11:27:05 +0100 Subject: [PATCH] Add vimwiki-sync plugin to nixvim --- home/common/core/nixvim/plugins/default.nix | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/home/common/core/nixvim/plugins/default.nix b/home/common/core/nixvim/plugins/default.nix index 7b40319..f06e9ba 100644 --- a/home/common/core/nixvim/plugins/default.nix +++ b/home/common/core/nixvim/plugins/default.nix @@ -1,4 +1,7 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: +let + user = config.home.username; +in { imports = [ ./cmp.nix @@ -38,6 +41,16 @@ }; }) + (pkgs.vimUtils.buildVimPlugin + { + name = "vimwiki-sync"; + src = pkgs.fetchFromGitHub { + owner = "michal-h21"; + repo = "vimwiki-sync"; + rev = "99eeab3"; + sha256 = "sha256-cz0dSFphIbQAI4AOqwIUpDBTuj/3xlOkhSlIVMdgsqM="; + }; + }) # Keep vim-devicons as last entry pkgs.vimPlugins.vim-devicons @@ -85,6 +98,16 @@ opts ) end + + -- Setup vimwiki + + vim.g.vimwiki_list = { + { + syntax = "markdown", + ext = ".md", + path = "/home/${user}/.local/share/notes", + }, + } ''; }