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:
parent
44c3361c10
commit
65d5ac12ef
1 changed files with 21 additions and 8 deletions
|
@ -135,6 +135,27 @@ return {
|
||||||
starter.gen_hook.aligning("center", "center"),
|
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
|
-- manually create lazy loading scenarios
|
||||||
vim.api.nvim_create_autocmd({ "InsertEnter", "CursorHold" }, {
|
vim.api.nvim_create_autocmd({ "InsertEnter", "CursorHold" }, {
|
||||||
once = true,
|
once = true,
|
||||||
|
@ -176,14 +197,6 @@ return {
|
||||||
vim.api.nvim_set_hl(0, "MiniCursorword", { bold = true, underline = false })
|
vim.api.nvim_set_hl(0, "MiniCursorword", { bold = true, underline = false })
|
||||||
vim.api.nvim_set_hl(0, "MiniCursorwordCurrent", { 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.fuzzy").setup()
|
||||||
require("mini.indentscope").setup({
|
require("mini.indentscope").setup({
|
||||||
symbol = "│",
|
symbol = "│",
|
||||||
|
|
Loading…
Reference in a new issue