From c2dc77e360fe91e07b6dafe839a0b3b93dc60ec7 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Thu, 2 Jan 2025 10:37:28 +0100 Subject: [PATCH] feat(neovim): install YAML related plugins --- modules/home-manager/cli/neovim/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/home-manager/cli/neovim/default.nix b/modules/home-manager/cli/neovim/default.nix index 280936a..d8c67ca 100644 --- a/modules/home-manager/cli/neovim/default.nix +++ b/modules/home-manager/cli/neovim/default.nix @@ -10,6 +10,16 @@ let url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.sug"; sha256 = "0294bc32b42c90bbb286a89e23ca3773b7ef50eff1ab523b1513d6a25c6b3f58"; }; + fromGitHub = rev: ref: repo: + pkgs.vimUtils.buildVimPlugin { + pname = "${pkgs.lib.strings.sanitizeDerivationName repo}"; + version = ref; + src = builtins.fetchGit { + url = "https://github.com/${repo}.git"; + ref = ref; + rev = rev; + }; + }; in { options.modules.cli.neovim = { @@ -44,6 +54,7 @@ in # Formatters nixfmt-rfc-style shfmt + yamlfmt ]; extraLuaConfig = (builtins.readFile ./files/options.lua); plugins = with pkgs.vimPlugins; [ @@ -181,6 +192,15 @@ in type = "lua"; config = ( builtins.readFile ./files/whichkey.lua ); } +# yaml companion + { + plugin = ( fromGitHub + "131b0d67bd2e0f1a02e0daf2f3460482221ce3c0" + "main" + "someone-stole-my-name/yaml-companion.nvim" + ); + type = "lua"; + } vim-helm ]; };