astro-nvim-v3 - add left hand control wasd + Alt for move block
This commit is contained in:
@@ -89,5 +89,5 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
{ "ribru17/bamboo.nvim", lazy = true },
|
||||
{ "ribru17/bamboo.nvim", lazy = true, opts = { integrations = { mini = true } } },
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ return {
|
||||
{ "gen740/SmoothCursor.nvim", enabled = false },
|
||||
{ "stevearc/resession.nvim", enabled = true },
|
||||
{ "AstroNvim/astrotheme", enabled = false },
|
||||
{ "echasnovski/mini.move", enabled = false },
|
||||
{ "echasnovski/mini.move", enabled = true },
|
||||
{ "scottmckendry/cyberdream.nvim", enabled = false },
|
||||
{ "HiPhish/rainbow-delimiters.nvim", enabled = false },
|
||||
{ "HiPhish/rainbow-delimiters.nvim", enabled = true },
|
||||
{ "xiyaowong/transparent.nvim", enabled = true },
|
||||
{ "MagicDuck/grug-far.nvim", enabled = false },
|
||||
|
||||
|
||||
40
lua/plugins/mini-move.lua
Normal file
40
lua/plugins/mini-move.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
return {
|
||||
"echasnovski/mini.move",
|
||||
keys = function(_, keys)
|
||||
local plugin = require("lazy.core.config").spec.plugins["mini.move"]
|
||||
local opts = require("lazy.core.plugin").values(plugin, "opts", false) -- resolve mini.clue options
|
||||
-- Populate the keys based on the user's options
|
||||
local mappings = {
|
||||
{ opts.mappings.line_left, desc = "Move line left" },
|
||||
{ opts.mappings.line_right, desc = "Move line right" },
|
||||
{ opts.mappings.line_down, desc = "Move line down" },
|
||||
{ opts.mappings.line_up, desc = "Move line up" },
|
||||
{ opts.mappings.left, desc = "Move selection left", mode = "v" },
|
||||
{ opts.mappings.right, desc = "Move selection right", mode = "v" },
|
||||
{ opts.mappings.down, desc = "Move selection down", mode = "v" },
|
||||
{ opts.mappings.up, desc = "Move selection up", mode = "v" },
|
||||
}
|
||||
mappings = vim.tbl_filter(function(m) return m[1] and #m[1] > 0 end, mappings)
|
||||
return vim.list_extend(mappings, keys)
|
||||
end,
|
||||
opts = {
|
||||
mappings = {
|
||||
left = "<A-a>",
|
||||
right = "<A-d>",
|
||||
down = "<A-s>",
|
||||
up = "<A-w>",
|
||||
line_left = "<A-a>",
|
||||
line_right = "<A-d>",
|
||||
line_down = "<A-s>",
|
||||
line_up = "<A-w>",
|
||||
},
|
||||
},
|
||||
specs = {
|
||||
{
|
||||
"bamboo", -- Replace with the correct name for the Bamboo colorscheme package if necessary
|
||||
optional = true,
|
||||
---@type BambooOptions -- Adjust type if Bamboo has specific options
|
||||
opts = { integrations = { mini = true } },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,16 +1,5 @@
|
||||
-- Plugins related to motion
|
||||
return {
|
||||
-- Move lines up/down/left/right
|
||||
{
|
||||
"echasnovski/mini.move",
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<A-h>", mode = { "n", "x" }, desc = "Move line/block left" },
|
||||
{ "<A-l>", mode = { "n", "x" }, desc = "Move line/block right" },
|
||||
{ "<A-j>", mode = { "n", "x" }, desc = "Move line/block down" },
|
||||
{ "<A-k>", mode = { "n", "x" }, desc = "Move line/block up" },
|
||||
},
|
||||
},
|
||||
-- Faster change/delete/replace delimiter pairs
|
||||
{
|
||||
"echasnovski/mini.surround",
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
return {
|
||||
{
|
||||
"HiPhish/rainbow-delimiters.nvim",
|
||||
-- event = { "InsertLeave", "TextChanged" },
|
||||
event = "TextChanged",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
{
|
||||
@@ -28,14 +26,7 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
-- specs = {
|
||||
-- {
|
||||
-- "catppuccin",
|
||||
-- optional = true,
|
||||
-- ---@type CatppuccinOptions
|
||||
-- opts = { integrations = { rainbow_delimiters = true } },
|
||||
-- },
|
||||
-- },
|
||||
event = "User AstroFile",
|
||||
main = "rainbow-delimiters.setup",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user