⚙️ config(nvim): multicursor added tu lualine

This commit is contained in:
Sergio Laín 2023-11-30 20:43:23 +01:00
parent abbfaa0eba
commit 75c2ed6f3f
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -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,
},
} }