From a2f43302e1524cc8fe38791e0fdc00a3695fb76b Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Fri, 17 May 2024 10:05:29 +0200 Subject: updates --- .config/nvim/lazy-lock.json | 3 ++ .config/nvim/lua/simenandre/plugins/harpoon.lua | 71 +++++++++++-------------- .config/nvim/lua/simenandre/remap.lua | 2 - 3 files changed, 35 insertions(+), 41 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 6744f12..0f99e38 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -5,8 +5,10 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "9d5ba06d6ee7418c674f498634617416d15b6239" }, + "copilot.vim": { "branch": "release", "commit": "7097b09e52621a97d11f254e04de5e5a0f26e5f5" }, "fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" }, "gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" }, + "harpoon": { "branch": "harpoon2", "commit": "da326d0438ac68dee9b6b62a734be940a8bd8405" }, "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c1fbdcb0d8d1295314f1612c4a247253e70299d9" }, @@ -16,6 +18,7 @@ "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, "nvim-lspconfig": { "branch": "master", "commit": "9619e53d3f99f0ca4ea3b88f5d97fce703131820" }, "nvim-treesitter": { "branch": "master", "commit": "11a3584b81c3249d2b6279305aee1c7ad273985a" }, + "oil.nvim": { "branch": "master", "commit": "9e3a02252dc5686f374f79f50a13cfe7547c05af" }, "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, diff --git a/.config/nvim/lua/simenandre/plugins/harpoon.lua b/.config/nvim/lua/simenandre/plugins/harpoon.lua index dbdf096..3bd4896 100644 --- a/.config/nvim/lua/simenandre/plugins/harpoon.lua +++ b/.config/nvim/lua/simenandre/plugins/harpoon.lua @@ -1,44 +1,37 @@ return { - "ThePrimeagen/harpoon", - branch = "harpoon2", - requires = { - { "nvim-lua/plenary.nvim" }, - }, - config = function() - local harpoon = require("harpoon") + "ThePrimeagen/harpoon", + branch = "harpoon2", + requires = { + { "nvim-lua/plenary.nvim" }, + }, + config = function() + local harpoon = require("harpoon") + harpoon:setup() - -- REQUIRED - harpoon:setup() - -- REQUIRED + vim.keymap.set("n", "a", function() + harpoon:list():add() + end) + vim.keymap.set("n", "", function() + harpoon.ui:toggle_quick_menu(harpoon:list()) + end) - vim.keymap.set("n", "a", function() - harpoon:list():add() - end) - vim.keymap.set("n", "", function() - harpoon.ui:toggle_quick_menu(harpoon:list()) - end) + -- vim.keymap.set("n", "", function() + -- harpoon:list():select(1) + -- end) + -- vim.keymap.set("n", "", function() + -- harpoon:list():select(2) + -- end) + -- vim.keymap.set("n", "", function() + -- harpoon:list():select(3) + -- end) + -- vim.keymap.set("n", "", function() + -- harpoon:list():select(4) + -- end) - vim.keymap.set("n", "", function() - harpoon:list():select(1) - end) - vim.keymap.set("n", "", function() - harpoon:list():select(2) - end) - vim.keymap.set("n", "", function() - harpoon:list():select(3) - end) - vim.keymap.set("n", "", function() - harpoon:list():select(4) - end) - -- vim.keymap.set("n", "", function() - -- harpoon:list():select(4) - -- end) - - vim.keymap.set("n", "", function() - harpoon:list():prev() - end) - vim.keymap.set("n", "", function() - harpoon:list():next() - end) - end, + for _, idx in ipairs({ 1, 2, 3, 4, 5 }) do + vim.keymap.set("n", string.format("%d", idx), function() + harpoon:list():select(idx) + end) + end + end, } diff --git a/.config/nvim/lua/simenandre/remap.lua b/.config/nvim/lua/simenandre/remap.lua index 36d44b3..a2fb673 100644 --- a/.config/nvim/lua/simenandre/remap.lua +++ b/.config/nvim/lua/simenandre/remap.lua @@ -3,8 +3,6 @@ vim.keymap.set("i", "", "") vim.keymap.set("n", "f", vim.lsp.buf.format) -vim.keymap.set("n", "pv", vim.cmd.Ex) - vim.keymap.set("v", "J", ":m '>+1gv=gv") vim.keymap.set("v", "K", ":m '<-2gv=gv") -- cgit v1.2.3