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