seperate out mini from lazy.nvim
This commit is contained in:
@@ -1,13 +1,22 @@
|
|||||||
---@module 'lazy'
|
-- Clone 'mini.nvim' manually in a way that it gets managed by 'mini.deps'
|
||||||
---@type LazySpec
|
local path_package = vim.fn.stdpath('data') .. '/site/'
|
||||||
return { {
|
local mini_path = path_package .. 'pack/deps/start/mini.nvim'
|
||||||
'nvim-mini/mini.nvim',
|
if not (vim.uv or vim.loop).fs_stat(mini_path) then
|
||||||
config = function()
|
vim.cmd('echo "Installing [`mini.nvim`](../doc/mini-nvim.qmd#mini.nvim)" | redraw')
|
||||||
require('mini.ai').setup()
|
local clone_cmd = {
|
||||||
require('mini.surround').setup()
|
'git', 'clone', '--filter=blob:none',
|
||||||
require('mini.operators').setup()
|
'https://github.com/nvim-mini/mini.nvim', mini_path
|
||||||
|
}
|
||||||
|
vim.fn.system(clone_cmd)
|
||||||
|
vim.cmd('packadd mini.nvim | helptags ALL')
|
||||||
|
vim.cmd('echo "Installed [`mini.nvim`](../doc/mini-nvim.qmd#mini.nvim)" | redraw')
|
||||||
|
end
|
||||||
|
|
||||||
require('mini.indentscope').setup({
|
require('mini.ai').setup()
|
||||||
|
require('mini.surround').setup()
|
||||||
|
require('mini.operators').setup()
|
||||||
|
|
||||||
|
require('mini.indentscope').setup({
|
||||||
symbol = '¦',
|
symbol = '¦',
|
||||||
draw = {
|
draw = {
|
||||||
delay = 50, -- delay in MS before writing the indicator
|
delay = 50, -- delay in MS before writing the indicator
|
||||||
@@ -16,10 +25,10 @@ return { {
|
|||||||
options = {
|
options = {
|
||||||
try_as_border = false,
|
try_as_border = false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_hl(0, 'MiniIndentscopeSymbol', { fg = _G.userdat.palette.dark2, bg = nil })
|
vim.api.nvim_set_hl(0, 'MiniIndentscopeSymbol', { fg = _G.userdat.palette.dark2, bg = nil })
|
||||||
|
|
||||||
require('mini.move').setup({
|
require('mini.move').setup({
|
||||||
mappings = {
|
mappings = {
|
||||||
-- move visual selection in visual mode
|
-- move visual selection in visual mode
|
||||||
left = '<m-h>',
|
left = '<m-h>',
|
||||||
@@ -36,9 +45,9 @@ return { {
|
|||||||
options = {
|
options = {
|
||||||
reindent_linewise = true, -- automatically re-indent selection during line vertical move
|
reindent_linewise = true, -- automatically re-indent selection during line vertical move
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
require('mini.statusline').setup({
|
require('mini.statusline').setup({
|
||||||
content = {
|
content = {
|
||||||
active = function()
|
active = function()
|
||||||
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
||||||
@@ -67,6 +76,8 @@ return { {
|
|||||||
},
|
},
|
||||||
use_icons = true,
|
use_icons = true,
|
||||||
set_vim_settings = true,
|
set_vim_settings = true,
|
||||||
})
|
})
|
||||||
end
|
|
||||||
} }
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
|
return {}
|
||||||
|
|||||||
Reference in New Issue
Block a user