[Events] Improve startup
This commit is contained in:
@@ -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 = {
|
||||
{ "<leader>ca", vim.lsp.buf.code_action, desc = "View code actions" },
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -10,7 +10,7 @@ return {
|
||||
version = "^1.0.0",
|
||||
},
|
||||
},
|
||||
event = { "BufRead", "BufNewFile" },
|
||||
event = { "LspAttach" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>ff",
|
||||
|
||||
Reference in New Issue
Block a user