about summary refs log tree commit diff stats
path: root/modules/home/conf/nvim/plgs/harpoon/default.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-18 17:07:46 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-18 17:07:46 +0200
commitc52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c (patch)
treee8b947710b467b32740598ff574982097836f66c /modules/home/conf/nvim/plgs/harpoon/default.nix
parentchore(pkgs/yt): 1.2.1 -> 1.3.0 (diff)
downloadnixos-config-c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c.tar.gz
nixos-config-c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c.zip
refactor(modules): Move all system modules to `by-name`
From now on all modules should be added to the new `by-name` directory.
This should help remove the (superficial and utterly useless)
distinction between `home-manager` and `NixOS` modules.
Diffstat (limited to 'modules/home/conf/nvim/plgs/harpoon/default.nix')
-rw-r--r--modules/home/conf/nvim/plgs/harpoon/default.nix94
1 files changed, 0 insertions, 94 deletions
diff --git a/modules/home/conf/nvim/plgs/harpoon/default.nix b/modules/home/conf/nvim/plgs/harpoon/default.nix
deleted file mode 100644
index 465f24f0..00000000
--- a/modules/home/conf/nvim/plgs/harpoon/default.nix
+++ /dev/null
@@ -1,94 +0,0 @@
-{pkgs, ...}: let
-  numbers = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"];
-  mkNumberedCommand = {
-    command_template,
-    prefix,
-    number,
-    desc_template,
-  }: {
-    key = "${prefix}${number}";
-    action.__raw = ''
-      function()
-        ${command_template number}
-      end
-    '';
-    options.desc = "${desc_template number}";
-  };
-  mkGotoTerminalCommand = number: let
-    desc_template = number: "Goto terminal number ${number}";
-    command_template = number: ''require("harpoon.term").gotoTerminal(${number})'';
-    prefix = "gt";
-  in
-    mkNumberedCommand {inherit desc_template command_template prefix number;};
-  mkGotoFileCommand = number: let
-    desc_template = number: "Goto Buffer number ${number}";
-    command_template = number: ''require("harpoon.ui").nav_file(${number})'';
-    prefix = "gf";
-  in
-    mkNumberedCommand {inherit desc_template command_template prefix number;};
-
-  gotoTerminalMappings = builtins.map mkGotoTerminalCommand numbers;
-  gotoFileMappings = builtins.map mkGotoFileCommand numbers;
-in {
-  programs.nixvim = {
-    plugins.harpoon = {
-      enable = true;
-      package = pkgs.vimPlugins.harpoon;
-      enableTelescope = true;
-      # menu.width = "vim.api.nvim_win_get_width(0) - 4"; # TODO: integrate that
-      keymaps = {
-        tmuxGotoTerminal = null; # TODO:
-      };
-    };
-    keymaps =
-      [
-        {
-          key = "-";
-          action.__raw = ''
-            function()
-              require("harpoon.ui").nav_next()
-             end
-          '';
-          options.desc = "go to the next marked file";
-        }
-        {
-          key = "_";
-          action.__raw = ''
-            function()
-              require("harpoon.ui").nav_prev()
-             end
-          '';
-          options.desc = "go to the previous marked file";
-        }
-        {
-          key = "<leader><leader>";
-          action.__raw = ''
-            function()
-              require("harpoon.mark").add_file()
-            end
-          '';
-          options.desc = "add a mark to the open file in harpoon.";
-        }
-        {
-          key = "gqc";
-          action.__raw = ''
-            function()
-              require("harpoon.cmd-ui").toggle_quick_menu()
-            end
-          '';
-          options.desc = "toggle the harpoon command quick menu to see all commands.";
-        }
-        {
-          key = "<leader>q";
-          action.__raw = ''
-            function()
-              require("harpoon.ui").toggle_quick_menu()
-            end
-          '';
-          options.desc = "toggle the harpoon normal quick menu to see all marks.";
-        }
-      ]
-      ++ gotoFileMappings
-      ++ gotoTerminalMappings;
-  };
-}