🪴 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mini: use `VimEnter` instead of `BufAdd` for lazy loading

`BufAdd` does not get called correctly if nvim is started with arguments.

robin 8448de50 b4c076e9

+10 -10
+10 -10
config/config/mini.lua
··· 1 1 local augroup = vim.augroup("editor:mini", true) 2 2 3 - augroup("BufAdd", nil, { once = true }, function() 3 + augroup("VimEnter", nil, { once = true }, function() 4 4 require("mini.ai").setup({ 5 5 mappings = { 6 6 -- Main textobject prefixes ··· 19 19 }, 20 20 }) 21 21 end) 22 - augroup("BufAdd", nil, { once = true }, function() 22 + augroup("VimEnter", nil, { once = true }, function() 23 23 require("mini.align").setup() 24 24 end) 25 - augroup("BufAdd", nil, { once = true }, function() 25 + augroup("VimEnter", nil, { once = true }, function() 26 26 require("mini.bracketed").setup() 27 27 end) 28 - augroup("BufAdd", nil, { once = true }, function() 28 + augroup("VimEnter", nil, { once = true }, function() 29 29 require("mini.diff").setup({ 30 30 view = { 31 31 style = "number", ··· 85 85 require("mini.files").open(vim.api.nvim_buf_get_name(0)) 86 86 end, { desc = "reveal current file in mini.files" }) 87 87 end) 88 - augroup("BufAdd", nil, { once = true }, function() 88 + augroup("VimEnter", nil, { once = true }, function() 89 89 require("mini.git").setup() 90 90 end) 91 91 augroup("UIEnter", nil, { once = true }, function() ··· 95 95 }, 96 96 }) 97 97 end) 98 - augroup("BufAdd", nil, { once = true }, function() 98 + augroup("VimEnter", nil, { once = true }, function() 99 99 require("mini.move").setup({ 100 100 mappings = { 101 101 -- Move visual selection in Visual mode. Defaults are Alt (Meta) + hjkl. ··· 118 118 }, 119 119 }) 120 120 end) 121 - augroup("BufAdd", nil, { once = true }, function() 121 + augroup("VimEnter", nil, { once = true }, function() 122 122 require("mini.operators").setup({ 123 123 exchange = { prefix = "Cx" }, 124 124 multiply = { prefix = "Cm" }, ··· 129 129 augroup("InsertEnter", nil, { once = true }, function() 130 130 require("mini.pairs").setup() 131 131 end) 132 - augroup("BufAdd", nil, { once = true }, function() 132 + augroup("VimEnter", nil, { once = true }, function() 133 133 require("mini.splitjoin").setup() 134 134 end) 135 - augroup("BufAdd", nil, { once = true }, function() 135 + augroup("VimEnter", nil, { once = true }, function() 136 136 require("mini.surround").setup({ 137 137 mappings = { 138 138 add = "S", -- Add surrounding in Normal and Visual modes ··· 147 147 }, 148 148 }) 149 149 end) 150 - augroup("BufAdd", nil, { once = true }, function() 150 + augroup("VimEnter", nil, { once = true }, function() 151 151 require("mini.trailspace").setup({ 152 152 -- highlight only in normal buffers (ones with empty 'buftype'). this is 153 153 -- useful to not show trailing whitespace where it usually doesn't matter.