lazy loading

This commit is contained in:
Oliver Ladner 2024-01-24 08:28:20 +01:00
commit ba56bab172
8 changed files with 77 additions and 67 deletions

View file

@ -29,30 +29,30 @@ macOS 14.0 (23A344).
### Start and open init.lua
Around 10% of the plugins are lazy-loaded.
Around 25% of the plugins are lazy-loaded.
```bash
Startuptime: 79.91ms
Startuptime: 100.58ms
Based on the actual CPU time of the Neovim process till UIEnter.
This is more accurate than `nvim --startuptime`.
LazyStart 11.53ms
LazyDone 46.36ms (+34.83ms)
UIEnter 79.91ms (+33.55ms)
LazyStart 11.04ms
LazyDone 25.69ms (+14.65ms)
UIEnter 100.58ms (+74.89ms)
```
### Starting with an empty file
Around 50% of the plugins are lazy-loaded.
Around 75% of the plugins are lazy-loaded.
```bash
Startuptime: 47.58ms
Startuptime: 32.31ms
Based on the actual CPU time of the Neovim process till UIEnter.
This is more accurate than `nvim --startuptime`.
LazyStart 11.16ms
LazyDone 41.83ms (+30.67ms)
UIEnter 47.58ms (+5.75ms)
LazyStart 10.71ms
LazyDone 25.36ms (+14.65ms)
UIEnter 32.31ms (+6.95ms)
```
## Plugins

View file

@ -1,4 +1,5 @@
return {
"nvim-tree/nvim-web-devicons",
lazy = true
lazy = true,
event = "VeryLazy",
}

View file

@ -1,14 +1,16 @@
return {
"lukas-reineke/indent-blankline.nvim",
lazy = true,
event = { "BufReadPre", "BufNewFile" },
main = "ibl",
opts = {},
config = function()
local indent = require('ibl').setup {
local indent = require("ibl").setup({
-- disable scope highlighting as it requires some tuning
scope = { enabled = false },
indent = {
char = ''
char = "",
},
}
end
})
end,
}

View file

@ -1,15 +1,17 @@
-- status line like vim-airline
return {
"nvim-lualine/lualine.nvim",
lazy = true,
event = { "BufReadPre", "BufNewFile" },
opts = {
options = {
icons_enabled = true,
theme = 'auto',
theme = "auto",
--component_separators = '⋮',
component_separators = '',
component_separators = "",
--section_separators = { left = '', right = '' },
--section_separators = { left = '', right = '' },
section_separators = { left = '', right = '' },
section_separators = { left = "", right = "" },
},
},
}

View file

@ -2,6 +2,8 @@
-- https://github.com/stevearc/oil.nvim
return {
"stevearc/oil.nvim",
lazy = true,
cmd = "Oil",
dependencies = {
"nvim-tree/nvim-web-devicons",
},

View file

@ -1,5 +1,8 @@
return {
"nvim-telescope/telescope.nvim",
lazy = true,
--event = "VeryLazy",
cmd = "Telescope",
tag = "0.1.5",
dependencies = {
"nvim-lua/plenary.nvim",

View file

@ -1,6 +1,6 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
event = { "BufReadPre", "BufNewFile" },
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 250
@ -20,5 +20,5 @@ return {
winblend = 1, -- value between 0-100 0 for fully opaque and 100 for fully transparent
zindex = 1000, -- positive value to position WhichKey above other floating windows.
},
}
},
}