From 78d671c682144c617089db2e9aa3bf20ae06d5a6 Mon Sep 17 00:00:00 2001 From: leafee98 Date: Thu, 14 Dec 2023 17:45:05 +0800 Subject: [PATCH] disable intro message, VeryLazy most plugins --- init.lua | 12 ++++++++---- lua/plugins/10-editor.lua | 7 +++++-- lua/plugins/20-git.lua | 1 + lua/plugins/20-treesitter.lua | 1 + lua/plugins/50-lsp.lua | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index d9ffc76..64ffb6c 100644 --- a/init.lua +++ b/init.lua @@ -1,19 +1,23 @@ -- enable read config from CWD vim.o.exrc = true +-- Disable intro message on startup, or many other plugins will +-- close this message on load, which may cause a flash of intro message. +vim.opt.shortmess:append({ I = true }) + vim.o.tabstop = 4 vim.o.shiftwidth = 0 vim.o.softtabstop = -1 vim.o.shiftround = true -vim.o.list = true -vim.o.relativenumber = true -vim.o.number = true - vim.o.expandtab = true vim.o.autoindent = true vim.o.smartindent = true +vim.o.list = true +vim.o.relativenumber = true +vim.o.number = true + vim.keymap.set("n", "\\q", "wincmd q", { silent = true }) vim.keymap.set("n", "zh", "wincmd h", { silent = true }) vim.keymap.set("n", "zj", "wincmd j", { silent = true }) diff --git a/lua/plugins/10-editor.lua b/lua/plugins/10-editor.lua index f70875b..93bc542 100644 --- a/lua/plugins/10-editor.lua +++ b/lua/plugins/10-editor.lua @@ -10,11 +10,11 @@ return { { "lukas-reineke/indent-blankline.nvim", main = "ibl", + event = "VeryLazy", opts = { }, }, { "famiu/bufdelete.nvim", - lazy = false, keys = { { "zx", "Bdelete", mode = "n" }, }, @@ -23,12 +23,14 @@ return { "karb94/neoscroll.nvim", enabled = custom.full_feature, main = "neoscroll", + event = "VeryLazy", opts = { }, }, { "akinsho/bufferline.nvim", enabled = custom.full_feature, main = "bufferline", + event = "VeryLazy", opts = { options = { numbers = "both", @@ -56,6 +58,7 @@ return { "nvim-tree/nvim-web-devicons" }, main = "lualine", + event = "VeryLazy", opts = { }, init = function(_) vim.o.mousemoveevent = true @@ -68,12 +71,12 @@ return { "nvim-tree/nvim-web-devicons" }, main = "nvim-tree", + event = "VeryLazy", opts = { filters = { git_ignored = false, }, }, - lazy = false, keys = { { "t", "NvimTreeFocus", mode = "n" }, { "f", "NvimTreeFindFile", mode = "n" }, diff --git a/lua/plugins/20-git.lua b/lua/plugins/20-git.lua index 28e0b55..841e3c6 100644 --- a/lua/plugins/20-git.lua +++ b/lua/plugins/20-git.lua @@ -1,6 +1,7 @@ return { "lewis6991/gitsigns.nvim", main = "gitsigns", + event = "VeryLazy", enabled = custom.full_feature, opts = { on_attach = function(bufnr) diff --git a/lua/plugins/20-treesitter.lua b/lua/plugins/20-treesitter.lua index e2354d7..b7c967c 100644 --- a/lua/plugins/20-treesitter.lua +++ b/lua/plugins/20-treesitter.lua @@ -53,6 +53,7 @@ end return { "nvim-treesitter/nvim-treesitter", name = "nvim-treesitter", + event = "VeryLazy", build = ":TSUpdate", opts = { indent = { enable = true }, diff --git a/lua/plugins/50-lsp.lua b/lua/plugins/50-lsp.lua index 649f4f3..d97257d 100644 --- a/lua/plugins/50-lsp.lua +++ b/lua/plugins/50-lsp.lua @@ -48,7 +48,7 @@ return { "hrsh7th/cmp-cmdline", "L3MON4D3/LuaSnip", }, - lazy = false, + event = "VeryLazy", config = function (_, opts) local capabilities = require("cmp_nvim_lsp").default_capabilities()