From 29dbb6b1a6ad9b17828b39a0252296c113da49e5 Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Wed, 27 Jul 2022 18:28:13 +0930 Subject: [PATCH] Wed 27 Jul 2022 18:28:13 ACST --- .config/nvim/lua/lsp/keymaps.lua | 10 +++++----- .config/nvim/lua/packer-plugins.lua | 4 +++- .config/nvim/plugin/packer_compiled.lua | 15 +++++++-------- update.sh | 6 +++--- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.config/nvim/lua/lsp/keymaps.lua b/.config/nvim/lua/lsp/keymaps.lua index 1a641f0..a2e7c1d 100644 --- a/.config/nvim/lua/lsp/keymaps.lua +++ b/.config/nvim/lua/lsp/keymaps.lua @@ -21,11 +21,11 @@ local function keymappings(client, bufnr) vim.keymap.set("n", "ff", vim.lsp.buf.formatting, opts) end - vim.keymap.set("n", "d", vim.lsp.buf.definition, opts) - vim.keymap.set("n", "D", vim.lsp.buf.declaration, opts) - vim.keymap.set("n", "h", vim.lsp.buf.signature_help, opts) - vim.keymap.set("n", "i", vim.lsp.buf.implementation, opts) - vim.keymap.set("n", "T", vim.lsp.buf.type_definition, opts) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) + vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts) + vim.keymap.set("n", "gh", vim.lsp.buf.signature_help, opts) + vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts) + vim.keymap.set("n", "gT", vim.lsp.buf.type_definition, opts) end diff --git a/.config/nvim/lua/packer-plugins.lua b/.config/nvim/lua/packer-plugins.lua index f8859ba..bebb1ae 100644 --- a/.config/nvim/lua/packer-plugins.lua +++ b/.config/nvim/lua/packer-plugins.lua @@ -11,12 +11,14 @@ return require('packer').startup(function() use { "neovim/nvim-lspconfig", + event = "BufReadPre", wants = { "cmp-nvim-lsp", "nvim-lsp-installer", "lsp_signature.nvim" }, config = function() - -- require("lsp").setup() + require("config.lsp").setup() end, requires = { "williamboman/nvim-lsp-installer", + "ray-x/lsp_signature.nvim", }, } diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua index 0c994a2..1a570f0 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim/plugin/packer_compiled.lua @@ -176,7 +176,7 @@ _G.packer_plugins = { url = "https://github.com/ray-x/lsp_signature.nvim" }, ["nvim-cmp"] = { - after = { "cmp-spell", "friendly-snippets", "cmp-buffer", "cmp-calc", "cmp-nvim-ultisnips", "cmp-path", "cmp-nvim-lsp" }, + after = { "cmp-nvim-ultisnips", "friendly-snippets", "cmp-spell", "cmp-buffer", "cmp-path", "cmp-calc", "cmp-nvim-lsp" }, config = { "\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15config.cmp\frequire\0" }, loaded = false, needs_bufread = false, @@ -190,9 +190,11 @@ _G.packer_plugins = { url = "https://github.com/williamboman/nvim-lsp-installer" }, ["nvim-lspconfig"] = { - config = { "\27LJ\2\n\v\0\0\1\0\0\0\1K\0\1\0\0" }, - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + config = { "\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15config.lsp\frequire\0" }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig", wants = { "cmp-nvim-lsp", "nvim-lsp-installer", "lsp_signature.nvim" } }, @@ -239,10 +241,6 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) --- Config for: nvim-lspconfig -time([[Config for nvim-lspconfig]], true) -try_loadstring("\27LJ\2\n\v\0\0\1\0\0\0\1K\0\1\0\0", "config", "nvim-lspconfig") -time([[Config for nvim-lspconfig]], false) -- Config for: LuaSnip time([[Config for LuaSnip]], true) try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19config.luasnip\frequire\0", "config", "LuaSnip") @@ -251,6 +249,7 @@ vim.cmd [[augroup packer_load_aucmds]] vim.cmd [[au!]] -- Event lazy-loads time([[Defining lazy-load event autocommands]], true) +vim.cmd [[au BufReadPre * ++once lua require("packer.load")({'nvim-lspconfig'}, { event = "BufReadPre *" }, _G.packer_plugins)]] vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'nvim-cmp'}, { event = "InsertEnter *" }, _G.packer_plugins)]] time([[Defining lazy-load event autocommands]], false) vim.cmd("augroup END") diff --git a/update.sh b/update.sh index baeca0a..f6500d0 100755 --- a/update.sh +++ b/update.sh @@ -15,9 +15,9 @@ declare -a FILES=( .config/nvim/lua/general/autocmd.lua .config/nvim/lua/config/cmp.lua .config/nvim/lua/config/luasnip.lua - .config/nvim/lua/lsp/init.lua - .config/nvim/lua/lsp/installer.lua - .config/nvim/lua/lsp/keymaps.lua + .config/nvim/lua/config/lsp/init.lua + .config/nvim/lua/config/lsp/installer.lua + .config/nvim/lua/config/lsp/keymaps.lua .config/nvim/lua/utils/init.lua .config/nvim/lua/helper/toggle-tab-width.lua .config/nvim/plugin