[Events] Improve startup

This commit is contained in:
2025-11-14 11:07:38 +01:00
parent 53ecdf21de
commit 20e1efe3e1
3 changed files with 5 additions and 5 deletions

View File

@@ -6,8 +6,9 @@ return {
max_height = 12, -- Max height of the preview window max_height = 12, -- Max height of the preview window
min_width = 20, -- Minimum width for the preview window min_width = 20, -- Minimum width for the preview window
min_height = 4, -- Minimum height for the preview window min_height = 4, -- Minimum height for the preview window
},
-- Keymaps (optional) event = {
"LspAttach"
}, },
keys = { keys = {
{ "<leader>ca", vim.lsp.buf.code_action, desc = "View code actions" }, { "<leader>ca", vim.lsp.buf.code_action, desc = "View code actions" },

View File

@@ -1,7 +1,7 @@
return { return {
-- competion -- competion
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
event = "InsertEnter", event = { "InsertEnter", "LspAttach" },
dependencies = { dependencies = {
{ "hrsh7th/cmp-buffer" }, -- source for text in buffer { "hrsh7th/cmp-buffer" }, -- source for text in buffer
{ "hrsh7th/cmp-path" }, -- source for file system paths { "hrsh7th/cmp-path" }, -- source for file system paths
@@ -10,7 +10,6 @@ return {
{ "rafamadriz/friendly-snippets" }, -- useful snippets { "rafamadriz/friendly-snippets" }, -- useful snippets
{ "onsails/lspkind.nvim" }, -- icons for cmp { "onsails/lspkind.nvim" }, -- icons for cmp
}, },
config = function() config = function()
local cmp = require("cmp") local cmp = require("cmp")
local lspkind = require("lspkind") local lspkind = require("lspkind")

View File

@@ -10,7 +10,7 @@ return {
version = "^1.0.0", version = "^1.0.0",
}, },
}, },
event = { "BufRead", "BufNewFile" }, event = { "LspAttach" },
keys = { keys = {
{ {
"<leader>ff", "<leader>ff",