From 50b7f426f287ecfc542dd9c197e430b0aca8af04 Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Fri, 29 Mar 2024 19:36:56 +0545 Subject: [PATCH 1/2] fix(harpoon): optimizes harpoon keys (#2877) --- .../plugins/extras/editor/harpoon2.lua | 82 +++++++------------ 1 file changed, 30 insertions(+), 52 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/harpoon2.lua b/lua/lazyvim/plugins/extras/editor/harpoon2.lua index 0aecc1cd..666f7d58 100644 --- a/lua/lazyvim/plugins/extras/editor/harpoon2.lua +++ b/lua/lazyvim/plugins/extras/editor/harpoon2.lua @@ -6,56 +6,34 @@ return { width = vim.api.nvim_win_get_width(0) - 4, }, }, - keys = { - { - "H", - function() - require("harpoon"):list():append() - end, - desc = "Harpoon File", - }, - { - "h", - function() - local harpoon = require("harpoon") - harpoon.ui:toggle_quick_menu(harpoon:list()) - end, - desc = "Harpoon Quick Menu", - }, - { - "1", - function() - require("harpoon"):list():select(1) - end, - desc = "Harpoon to File 1", - }, - { - "2", - function() - require("harpoon"):list():select(2) - end, - desc = "Harpoon to File 2", - }, - { - "3", - function() - require("harpoon"):list():select(3) - end, - desc = "Harpoon to File 3", - }, - { - "4", - function() - require("harpoon"):list():select(4) - end, - desc = "Harpoon to File 4", - }, - { - "5", - function() - require("harpoon"):list():select(5) - end, - desc = "Harpoon to File 5", - }, - }, + keys = function() + local keys = { + { + "H", + function() + require("harpoon"):list():append() + end, + desc = "Harpoon File", + }, + { + "h", + function() + local harpoon = require("harpoon") + harpoon.ui:toggle_quick_menu(harpoon:list()) + end, + desc = "Harpoon Quick Menu", + } + } + + for i = 1, 5 do + table.insert(keys, { + "" .. i, + function() + require("harpoon"):list():select(i) + end, + desc = "Harpoon to File " .. i, + }) + end + return keys + end } From 97480dc5d2dbb717b45a351e0b04835f138a9094 Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Sat, 30 Mar 2024 02:55:03 +0545 Subject: [PATCH 2/2] feat(dot): add bashls and shellcheck (#2879) --- lua/lazyvim/plugins/extras/util/dot.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index 8ba24b51..cf5c048f 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -7,6 +7,23 @@ local function have(path) end return { + { + "neovim/nvim-lspconfig", + opts = { + servers = { + bashls = {}, + }, + }, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed or {}, { + "shfmt", + "shellcheck", + }) + end, + }, -- add some stuff to treesitter { "nvim-treesitter/nvim-treesitter",