From d3ce1b22c4f37c3549fd4668a4856519baf09827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme=22=20=28aider=29?= Date: Fri, 22 Nov 2024 14:43:50 +0100 Subject: [PATCH] refactor: Split plugin configurations from other.nix into separate files --- modules/programs/nvim/new_plugins/comment.nix | 10 ++ .../programs/nvim/new_plugins/crates-nvim.nix | 10 ++ modules/programs/nvim/new_plugins/direnv.nix | 10 ++ .../nvim/new_plugins/friendly-snippets.nix | 10 ++ .../programs/nvim/new_plugins/fugitive.nix | 10 ++ .../programs/nvim/new_plugins/gitsigns.nix | 10 ++ .../programs/nvim/new_plugins/helpview.nix | 11 +++ modules/programs/nvim/new_plugins/hmts.nix | 11 +++ modules/programs/nvim/new_plugins/keymaps.nix | 15 +++ .../programs/nvim/new_plugins/lastplace.nix | 10 ++ .../nvim/new_plugins/markdown-preview.nix | 10 ++ modules/programs/nvim/new_plugins/marks.nix | 13 +++ modules/programs/nvim/new_plugins/mini.nix | 16 +++ .../nvim/new_plugins/nvim-autopairs.nix | 10 ++ .../programs/nvim/new_plugins/obsidian.nix | 29 ++++++ modules/programs/nvim/new_plugins/oil.nix | 10 ++ modules/programs/nvim/new_plugins/other.nix | 99 ------------------- .../nvim/new_plugins/render-markdown.nix | 13 +++ .../nvim/new_plugins/todo-comments.nix | 13 +++ .../new_plugins/ts-context-commentstring.nix | 10 ++ .../nvim/new_plugins/vim-surround.nix | 10 ++ modules/programs/nvim/new_plugins/vimtex.nix | 13 +++ .../programs/nvim/new_plugins/which-key.nix | 10 ++ 23 files changed, 264 insertions(+), 99 deletions(-) delete mode 100644 modules/programs/nvim/new_plugins/other.nix diff --git a/modules/programs/nvim/new_plugins/comment.nix b/modules/programs/nvim/new_plugins/comment.nix index e69de29..7dd0ae1 100644 --- a/modules/programs/nvim/new_plugins/comment.nix +++ b/modules/programs/nvim/new_plugins/comment.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.comment.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/crates-nvim.nix b/modules/programs/nvim/new_plugins/crates-nvim.nix index e69de29..dd50bfd 100644 --- a/modules/programs/nvim/new_plugins/crates-nvim.nix +++ b/modules/programs/nvim/new_plugins/crates-nvim.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.crates-nvim.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/direnv.nix b/modules/programs/nvim/new_plugins/direnv.nix index e69de29..3f6922a 100644 --- a/modules/programs/nvim/new_plugins/direnv.nix +++ b/modules/programs/nvim/new_plugins/direnv.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.direnv.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/friendly-snippets.nix b/modules/programs/nvim/new_plugins/friendly-snippets.nix index e69de29..9c64552 100644 --- a/modules/programs/nvim/new_plugins/friendly-snippets.nix +++ b/modules/programs/nvim/new_plugins/friendly-snippets.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.friendly-snippets.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/fugitive.nix b/modules/programs/nvim/new_plugins/fugitive.nix index e69de29..97d5d11 100644 --- a/modules/programs/nvim/new_plugins/fugitive.nix +++ b/modules/programs/nvim/new_plugins/fugitive.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.fugitive.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/gitsigns.nix b/modules/programs/nvim/new_plugins/gitsigns.nix index e69de29..2e1db6e 100644 --- a/modules/programs/nvim/new_plugins/gitsigns.nix +++ b/modules/programs/nvim/new_plugins/gitsigns.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.gitsigns.enable = true; + }; +} diff --git a/modules/programs/nvim/new_plugins/helpview.nix b/modules/programs/nvim/new_plugins/helpview.nix index e69de29..6b00df4 100644 --- a/modules/programs/nvim/new_plugins/helpview.nix +++ b/modules/programs/nvim/new_plugins/helpview.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.helpview.enable = true; + performance.combinePlugins.standalonePlugins = [ "helpview.nvim" ]; + }; +} diff --git a/modules/programs/nvim/new_plugins/hmts.nix b/modules/programs/nvim/new_plugins/hmts.nix index e69de29..041793f 100644 --- a/modules/programs/nvim/new_plugins/hmts.nix +++ b/modules/programs/nvim/new_plugins/hmts.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + plugins.hmts.enable = true; + performance.combinePlugins.standalonePlugins = [ "hmts.nvim" ]; + }; +} diff --git a/modules/programs/nvim/new_plugins/keymaps.nix b/modules/programs/nvim/new_plugins/keymaps.nix index e69de29..7c14693 100644 --- a/modules/programs/nvim/new_plugins/keymaps.nix +++ b/modules/programs/nvim/new_plugins/keymaps.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, inputs, ... }: + +let + inherit (lib) mkEnableOption mkIf readFile; +in +{ + home-manager.users.moritz.programs.nixvim = { + keymaps = [ + { key = ""; action = "noh"; options.desc = "Escape and clear hlsearch"; mode = [ "i" "n" ]; } + { key = "<"; action = "