⚙️ 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,4 +1,5 @@
return {
{
"smoka7/multicursors.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
@ -9,5 +10,39 @@ return {
keys = {
{ 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,
},
}