From 7dbb179968c3091c09c51cd7339b19e6d3ba595c Mon Sep 17 00:00:00 2001 From: Florian Schmitt Date: Tue, 23 Apr 2024 09:34:05 +0300 Subject: [PATCH] feat(nvim): more harpoon keys, better move lines, centered neo-tree --- dotfiles/nvim/lua/config/keymaps.lua | 33 ++++++++++++++++++++++++---- dotfiles/nvim/lua/plugins/mrflos.lua | 3 +++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/dotfiles/nvim/lua/config/keymaps.lua b/dotfiles/nvim/lua/config/keymaps.lua index f6565e8..7238ea3 100644 --- a/dotfiles/nvim/lua/config/keymaps.lua +++ b/dotfiles/nvim/lua/config/keymaps.lua @@ -1,18 +1,43 @@ -- Keymaps are automatically loaded on the VeryLazy event -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Add any additional keymaps here -vim.keymap.set({ "i", "x", "n", "s" }, "", function() +local map = vim.keymap.set +map({ "i", "x", "n", "s" }, "", function() require("harpoon"):list():select(1) end, { desc = "Harpoon file 1" }) -vim.keymap.set({ "i", "x", "n", "s" }, "", function() +map({ "i", "x", "n", "s" }, "", function() require("harpoon"):list():select(2) end, { desc = "Harpoon file 2" }) -vim.keymap.set({ "i", "x", "n", "s" }, "", function() +map({ "i", "x", "n", "s" }, "", function() require("harpoon"):list():select(3) end, { desc = "Harpoon file 3" }) -vim.keymap.set({ "i", "x", "n", "s" }, "", function() +map({ "i", "x", "n", "s" }, "", function() require("harpoon"):list():select(4) end, { desc = "Harpoon file 4" }) + +map({ "i", "x", "n", "s" }, "", function() + require("harpoon"):list():select(5) +end, { desc = "Harpoon file 5" }) + +map({ "i", "x", "n", "s" }, "", function() + require("harpoon"):list():select(6) +end, { desc = "Harpoon file 6" }) + +map({ "i", "x", "n", "s" }, "", function() + require("harpoon"):list():select(7) +end, { desc = "Harpoon file 7" }) + +map({ "i", "x", "n", "s" }, "", function() + require("harpoon"):list():select(8) +end, { desc = "Harpoon file 8" }) + +-- Move Lines +map("n", "", "m .+1==", { desc = "Move Down" }) +map("n", "", "m .-2==", { desc = "Move Up" }) +map("i", "", "m .+1==gi", { desc = "Move Down" }) +map("i", "", "m .-2==gi", { desc = "Move Up" }) +map("v", "", ":m '>+1gv=gv", { desc = "Move Down" }) +map("v", "", ":m '<-2gv=gv", { desc = "Move Up" }) diff --git a/dotfiles/nvim/lua/plugins/mrflos.lua b/dotfiles/nvim/lua/plugins/mrflos.lua index 0cf60ed..77f3b43 100644 --- a/dotfiles/nvim/lua/plugins/mrflos.lua +++ b/dotfiles/nvim/lua/plugins/mrflos.lua @@ -82,6 +82,9 @@ return { visible = true, }, }, + window = { + position = "float", + }, }, },