From 217161d1dcd1eb6bb432e088fca523d5cde1f3db Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 30 Jan 2024 22:36:55 +0000 Subject: [PATCH] refactor(nvim): harpoon2 & elixirls --- home/apps/nvim/lazy-lock.json | 2 ++ home/apps/nvim/lua/config/lazy.lua | 1 + home/apps/nvim/lua/plugins/editor.lua | 27 +++++++++++++++++++++++++-- home/apps/nvim/lua/plugins/lsp.lua | 7 ++++--- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/home/apps/nvim/lazy-lock.json b/home/apps/nvim/lazy-lock.json index 32ce45d..c675b80 100644 --- a/home/apps/nvim/lazy-lock.json +++ b/home/apps/nvim/lazy-lock.json @@ -15,6 +15,7 @@ "dressing.nvim": { "branch": "master", "commit": "169877dbcae54b23b464b219e053e92854bbb37f" }, "friendly-snippets": { "branch": "main", "commit": "bc38057e513458cb2486b6cd82d365fa294ee398" }, "gitsigns.nvim": { "branch": "main", "commit": "bae45ef449d8811061cc940459e70e883a3aa83a" }, + "harpoon": { "branch": "harpoon2", "commit": "95c04787c450357ec738b3d8da4b395c808a7a1e" }, "indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" }, "lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, "ltex_extra.nvim": { "branch": "master", "commit": "9bed99b2b8488cc2daf66c76d2e0cf051ee80d13" }, @@ -61,6 +62,7 @@ "typescript.nvim": { "branch": "main", "commit": "de304087e6e49981fde01af8ccc5b21e8519306f" }, "venv-selector.nvim": { "branch": "main", "commit": "cc312074371aff5b0d8d481b80c9c4de2a5287d7" }, "vim-illuminate": { "branch": "master", "commit": "5ed17582a8e97bf0a0c617c3cf762e98f87b9859" }, + "vim-just": { "branch": "main", "commit": "ee884dc7d45251d92f5972c4556c12fc101419c0" }, "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, "vimtex": { "branch": "master", "commit": "877de3ba5de5f766e5bfa1c3fb0d2ecfcd18f868" }, "which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" } diff --git a/home/apps/nvim/lua/config/lazy.lua b/home/apps/nvim/lua/config/lazy.lua index 1b7d201..e194d72 100644 --- a/home/apps/nvim/lua/config/lazy.lua +++ b/home/apps/nvim/lua/config/lazy.lua @@ -14,6 +14,7 @@ require("lazy").setup({ { import = "lazyvim.plugins.extras.util.project" }, { import = "lazyvim.plugins.extras.dap.core" }, { import = "lazyvim.plugins.extras.lang.typescript" }, + { import = "lazyvim.plugins.extras.lang.elixir" }, { import = "lazyvim.plugins.extras.lang.json" }, { import = "lazyvim.plugins.extras.coding.copilot" }, { import = "lazyvim.plugins.extras.lang.python" }, diff --git a/home/apps/nvim/lua/plugins/editor.lua b/home/apps/nvim/lua/plugins/editor.lua index 2d1984d..686d14c 100644 --- a/home/apps/nvim/lua/plugins/editor.lua +++ b/home/apps/nvim/lua/plugins/editor.lua @@ -89,7 +89,7 @@ return { opts = { -- TODO: Add in keymaps for for toggleterm open_mapping = [[bm", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, desc = "Open Harpoon Menu", }, + { "bb", function() harpoon:list():append() end, desc = "Add To Harpoon", }, + { "1", function() harpoon:list():select(1) end }, + { "2", function() harpoon:list():select(2) end }, + { "3", function() harpoon:list():select(3) end }, + { "4", function() harpoon:list():select(4) end }, + } + end, + }, { "windwp/nvim-autopairs", event = "InsertEnter", - opts = {}, -- this is equalent to setup({}) function + opts = {}, -- this is equivalent to setup({}) function + }, + { + "NoahTheDuke/vim-just", + event = { "BufReadPre", "BufNewFile" }, + ft = { "\\cjustfile", "*.just", ".justfile" }, }, } diff --git a/home/apps/nvim/lua/plugins/lsp.lua b/home/apps/nvim/lua/plugins/lsp.lua index 51f3414..bbe9530 100644 --- a/home/apps/nvim/lua/plugins/lsp.lua +++ b/home/apps/nvim/lua/plugins/lsp.lua @@ -38,7 +38,7 @@ return { keys[#keys + 1] = { "gl", vim.diagnostic.open_float, "Line Diagnostics" } end, opts = { - diagnostics = { underline = false }, + diagnostics = { underline = false, update_in_insert = true }, inlay_hints = { enabled = true }, autoformat = false, ---@type lspconfig.options @@ -79,6 +79,7 @@ return { "ltex-ls", "marksman", "yaml-language-server", + "elixir-ls", -- linter "yamllint", "jsonlint", @@ -107,8 +108,8 @@ return { opts.mapping = vim.tbl_extend("force", opts.mapping, { [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping(function(fallback) if cmp.visible() then -- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior