From eb07eb998f7708b2224db4ed257c9369fcac33ed Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Mon, 16 Sep 2024 17:36:48 +0200 Subject: [PATCH] feat(nvim): install nvim-sops plugin --- modules/home-manager/cli/neovim/default.nix | 5 +++++ modules/home-manager/cli/neovim/files/nvim-sops.lua | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 modules/home-manager/cli/neovim/files/nvim-sops.lua diff --git a/modules/home-manager/cli/neovim/default.nix b/modules/home-manager/cli/neovim/default.nix index 19d8962..808762b 100644 --- a/modules/home-manager/cli/neovim/default.nix +++ b/modules/home-manager/cli/neovim/default.nix @@ -111,6 +111,11 @@ in type = "lua"; config = ( builtins.readFile ./files/nvim-lint.lua); } + { + plugin = nvim-sops; + type = "lua"; + config = (builtins.readFile ./files/nvim-sops.lua); + } plenary-nvim { plugin = (nvim-treesitter.withPlugins (p: [ diff --git a/modules/home-manager/cli/neovim/files/nvim-sops.lua b/modules/home-manager/cli/neovim/files/nvim-sops.lua new file mode 100644 index 0000000..93153a3 --- /dev/null +++ b/modules/home-manager/cli/neovim/files/nvim-sops.lua @@ -0,0 +1,4 @@ +require('nvim_sops').setup {} + +vim.keymap.set("n", "se", vim.cmd.SopsEncrypt, { desc = "Sops: [E]ncrypt file" }) +vim.keymap.set("n", "sd", vim.cmd.SopsDecrypt, { desc = "Sops: [D]ecrypt file" })