summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-11-26 20:25:15 +0100
committersils <sils@sils.li>2023-11-26 20:25:15 +0100
commit6c107bf20d834d59d2afc26763fde4c6df2de538 (patch)
treefc74b80d8255ca5bee4bd1792a1895629ed2d8b1
parentfix(flake): inputs.poetry2nix.inputs.systems.follows = "systems" (diff)
downloadnix-config-6c107bf20d834d59d2afc26763fde4c6df2de538.tar.gz
nix-config-6c107bf20d834d59d2afc26763fde4c6df2de538.zip
fix(u/sils/nixvim): migrate to new keympap format
Diffstat (limited to '')
-rw-r--r--users/sils/nixvim/config.nix35
-rw-r--r--users/sils/nixvim/maps/default.nix28
2 files changed, 34 insertions, 29 deletions
diff --git a/users/sils/nixvim/config.nix b/users/sils/nixvim/config.nix
index c6f6061..56e841d 100644
--- a/users/sils/nixvim/config.nix
+++ b/users/sils/nixvim/config.nix
@@ -12,7 +12,40 @@ in {
     linebreak = true;
   };
   colorschemes.gruvbox.enable = true;
-  inherit maps;
+  keymaps = [
+    {
+      mode = ["n" "i" "t"];
+      key = "<A-h>";
+      action = ''<C-\><C-N><C-w>h'';
+    }
+    {
+      mode = ["n" "i" "t"];
+      key = "<A-j>";
+      action = ''<C-\><C-N><C-w>j'';
+    }
+    {
+      mode = ["n" "i" "t"];
+      key = "<A-k>";
+      action = ''<C-\><C-N><C-w>k'';
+    }
+    {
+      mode = ["n" "i" "t"];
+      key = "<A-l>";
+      action = ''<C-\><C-N><C-w>l'';
+    }
+    {
+      key = "<A-t>";
+      action = ":Neotree float reveal_force_cwd<cr>";
+    }
+    {
+      key = "<A-b>";
+      action = ":Neotree current show buffers<cr>";
+    }
+    {
+      key = "<A-s>";
+      action = ":Neotree float git_status<cr>";
+    }
+  ];
   plugins = {
     airline = {
       enable = true;
diff --git a/users/sils/nixvim/maps/default.nix b/users/sils/nixvim/maps/default.nix
deleted file mode 100644
index 6f4aac3..0000000
--- a/users/sils/nixvim/maps/default.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-  terminal = {
-    # Move into different windows
-    "<A-h>" = ''<C-\><C-N><C-w>h'';
-    "<A-j>" = ''<C-\><C-N><C-w>j'';
-    "<A-k>" = ''<C-\><C-N><C-w>k'';
-    "<A-l>" = ''<C-\><C-N><C-w>l'';
-  };
-  normal = {
-    # Move into different windows
-    "<A-h>" = ''<C-\><C-N><C-w>h'';
-    "<A-j>" = ''<C-\><C-N><C-w>j'';
-    "<A-k>" = ''<C-\><C-N><C-w>k'';
-    "<A-l>" = ''<C-\><C-N><C-w>l'';
-
-    #Neotree
-    "<A-t>" = ":Neotree float reveal_force_cwd<cr>";
-    "<A-b>" = ":Neotree current show buffers<cr>";
-    "<A-s>" = ":Neotree float git_status<cr>";
-  };
-  insert = {
-    # Move into different windows
-    "<A-h>" = ''<Esc><C-w>h'';
-    "<A-j>" = ''<Esc><C-w>j'';
-    "<A-k>" = ''<Esc><C-w>k'';
-    "<A-l>" = ''<Esc><C-w>l'';
-  };
-}