diff --git a/init.lua b/init.lua index 5805f7c7..27b3a124 100644 --- a/init.lua +++ b/init.lua @@ -253,6 +253,7 @@ vim.keymap.set({ 'n', 'v' }, '', '', { silent = true }) vim.keymap.set('n', 'sr', ':%s///g', { desc = "Find and replace all words under the cursor" }) vim.keymap.set('n', 'cv', 'Ex', { desc = "Back to file tree one step" }) vim.keymap.set('n', 'pv', 'Ex .', { desc = "Back to file tree root" }) +vim.keymap.set('n', 'ee', 'oif err != nil {log.Fatalf("%+v\\n", err)}kkIf%i', { desc = "Error check for Go" }) -- [[ Highlight on yank ]] -- See `:help vim.highlight.on_yank()` diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua new file mode 100644 index 00000000..1d24df8d --- /dev/null +++ b/lua/custom/plugins/harpoon.lua @@ -0,0 +1,23 @@ +return { + -- Jumping between windows + 'ThePrimeagen/harpoon', + dependencies = { + 'nvim-lua/plenary.nvim' + }, + + config = function () + require("harpoon").setup() + -- Harpoon keymaps + vim.keymap.set('n', '', require('harpoon.mark').add_file, { desc = "Add file to harpoon list" }) + vim.keymap.set('n', '', require('harpoon.ui').toggle_quick_menu, { desc = "Toggle harpoon quick menu" }) + vim.keymap.set('n', '1', function() require('harpoon.ui').nav_file(1) end, { desc = "Navigate to file at posistion 1" }) + vim.keymap.set('n', '2', function() require('harpoon.ui').nav_file(2) end, { desc = "Navigate to file at posistion 2" }) + vim.keymap.set('n', '3', function() require('harpoon.ui').nav_file(3) end, { desc = "Navigate to file at posistion 3" }) + vim.keymap.set('n', '4', function() require('harpoon.ui').nav_file(4) end, { desc = "Navigate to file at posistion 4" }) + vim.keymap.set('n', '5', function() require('harpoon.ui').nav_file(5) end, { desc = "Navigate to file at posistion 5" }) + vim.keymap.set('n', '6', function() require('harpoon.ui').nav_file(6) end, { desc = "Navigate to file at posistion 6" }) + vim.keymap.set('n', '7', function() require('harpoon.ui').nav_file(7) end, { desc = "Navigate to file at posistion 7" }) + vim.keymap.set('n', '8', function() require('harpoon.ui').nav_file(8) end, { desc = "Navigate to file at posistion 8" }) + vim.keymap.set('n', '9', function() require('harpoon.ui').nav_file(9) end, { desc = "Navigate to file at posistion 9" }) + end, +} diff --git a/lua/custom/plugins/keybindings.lua b/lua/custom/plugins/keybindings.lua new file mode 100644 index 00000000..50292372 --- /dev/null +++ b/lua/custom/plugins/keybindings.lua @@ -0,0 +1,17 @@ +return { + vim.keymap.set({'n','i', 'v'}, '', ':echo "NO LEFT FOR YOU!"'), + vim.keymap.set({'n','i', 'v'}, '', ':echo "NO RIGHT FOR YOU!"'), + vim.keymap.set({'n','i', 'v'}, '', ':echo "NO UP FOR YOU!"'), + vim.keymap.set({'n','i', 'v'}, '', ':echo "NO DOWN FOR YOU!"'), +-- +-- function arrow_toggle() +-- if vim.opt["arrow"]:get() == "off" then +-- vim.opt["arrow"] = "on" +-- vim.keymap.set({'n','i', 'v'}, '', '') +-- vim.keymap.set({'n','i', 'v'}, '', '') +-- vim.keymap.set({'n','i', 'v'}, '', '') +-- vim.keymap.set({'n','i', 'v'}, '', '') +-- end +-- +-- end +}