nvim: Load mini files earlier

Since sometimes it is necessary to have correct access to the files
functionality earlier than was possible with the old lazy loading this
instead loads it at program start as well.
This commit is contained in:
Marty Oehme 2024-09-15 22:09:18 +02:00
parent 44c3361c10
commit 65d5ac12ef
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -135,6 +135,27 @@ return {
starter.gen_hook.aligning("center", "center"),
},
})
require("mini.files").setup({
mappings = {
synchronize = "S",
go_in = "L", -- switch go-ins around
go_in_plus = "l",
go_out = "H",
go_out_plus = "h",
},
options = {
use_as_default_explorer = true,
},
})
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesWindowUpdate",
callback = function(args)
local win_id = args.data.win_id
vim.wo[win_id].number = true
end,
})
-- manually create lazy loading scenarios
vim.api.nvim_create_autocmd({ "InsertEnter", "CursorHold" }, {
once = true,
@ -176,14 +197,6 @@ return {
vim.api.nvim_set_hl(0, "MiniCursorword", { bold = true, underline = false })
vim.api.nvim_set_hl(0, "MiniCursorwordCurrent", { bold = true, underline = false })
require("mini.files").setup()
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesWindowUpdate",
callback = function(args)
vim.wo[args.data.win_id].number = true
end,
})
require("mini.fuzzy").setup()
require("mini.indentscope").setup({
symbol = "",