⚙️ config(nvim): multicursor added tu lualine
This commit is contained in:
parent
abbfaa0eba
commit
75c2ed6f3f
1 changed files with 42 additions and 7 deletions
|
@ -1,13 +1,48 @@
|
||||||
return {
|
return {
|
||||||
"smoka7/multicursors.nvim",
|
{
|
||||||
dependencies = {
|
"smoka7/multicursors.nvim",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
dependencies = {
|
||||||
"smoka7/hydra.nvim",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
},
|
"smoka7/hydra.nvim",
|
||||||
cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" },
|
},
|
||||||
|
cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" },
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ mode = { "v", "n" }, "<Leader>m", "<cmd>MCstart<cr>", desc = "Create a selection for selected text or word under the cursor" },
|
{ mode = { "v", "n" }, "<Leader>m", "<cmd>MCstart<cr>", desc = "Create a selection for selected text or word under the cursor" },
|
||||||
},
|
},
|
||||||
config = true,
|
opts = {
|
||||||
|
hint_config = {
|
||||||
|
border = "rounded",
|
||||||
|
position = "bottom-right",
|
||||||
|
},
|
||||||
|
generate_hints = {
|
||||||
|
normal = true,
|
||||||
|
insert = true,
|
||||||
|
extend = true,
|
||||||
|
config = {
|
||||||
|
column_count = 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
local function is_active()
|
||||||
|
local ok, hydra = pcall(require, "hydra.statusline")
|
||||||
|
return ok and hydra.is_active()
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_name()
|
||||||
|
local ok, hydra = pcall(require, "hydra.statusline")
|
||||||
|
if ok then
|
||||||
|
return hydra.get_name()
|
||||||
|
end
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert(opts.sections.lualine_b, { get_name, cond = is_active })
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue