diff --git a/nvim/lua/plugins/lsp/actions-preview.lua b/nvim/lua/plugins/lsp/actions-preview.lua index e2241a6..9bb6f5f 100755 --- a/nvim/lua/plugins/lsp/actions-preview.lua +++ b/nvim/lua/plugins/lsp/actions-preview.lua @@ -6,8 +6,9 @@ return { max_height = 12, -- Max height of the preview window min_width = 20, -- Minimum width for the preview window min_height = 4, -- Minimum height for the preview window - - -- Keymaps (optional) + }, + event = { + "LspAttach" }, keys = { { "ca", vim.lsp.buf.code_action, desc = "View code actions" }, diff --git a/nvim/lua/plugins/lsp/cmp.lua b/nvim/lua/plugins/lsp/cmp.lua index 481d3e1..18c8de7 100755 --- a/nvim/lua/plugins/lsp/cmp.lua +++ b/nvim/lua/plugins/lsp/cmp.lua @@ -1,7 +1,7 @@ return { -- competion "hrsh7th/nvim-cmp", - event = "InsertEnter", + event = { "InsertEnter", "LspAttach" }, dependencies = { { "hrsh7th/cmp-buffer" }, -- source for text in buffer { "hrsh7th/cmp-path" }, -- source for file system paths @@ -10,7 +10,6 @@ return { { "rafamadriz/friendly-snippets" }, -- useful snippets { "onsails/lspkind.nvim" }, -- icons for cmp }, - config = function() local cmp = require("cmp") local lspkind = require("lspkind") diff --git a/nvim/lua/plugins/nav/telescope.lua b/nvim/lua/plugins/nav/telescope.lua index 663bf7c..05e3e5f 100755 --- a/nvim/lua/plugins/nav/telescope.lua +++ b/nvim/lua/plugins/nav/telescope.lua @@ -10,7 +10,7 @@ return { version = "^1.0.0", }, }, - event = { "BufRead", "BufNewFile" }, + event = { "LspAttach" }, keys = { { "ff",