add mappings to move lines up and down

This commit is contained in:
2025-08-12 09:56:51 +01:00
parent 45458b78c1
commit 34ea1ee888

View File

@@ -5,7 +5,7 @@
---@type LazySpec
return {
"AstroNvim/astrocore",
'AstroNvim/astrocore',
---@type AstroCoreOpts
opts = {
-- Configure core features of AstroNvim
@@ -26,13 +26,13 @@ return {
filetypes = {
-- see `:h vim.filetype.add` for usage
extension = {
foo = "fooscript",
foo = 'fooscript',
},
filename = {
[".foorc"] = "fooscript",
['.foorc'] = 'fooscript',
},
pattern = {
[".*/etc/foo/.*"] = "fooscript",
['.*/etc/foo/.*'] = 'fooscript',
},
},
-- vim options can be configured here
@@ -41,7 +41,7 @@ return {
relativenumber = true, -- sets vim.opt.relativenumber
number = true, -- sets vim.opt.number
spell = false, -- sets vim.opt.spell
signcolumn = "yes", -- sets vim.opt.signcolumn to yes
signcolumn = 'yes', -- sets vim.opt.signcolumn to yes
wrap = false, -- sets vim.opt.wrap
},
g = { -- vim.g.<key>
@@ -58,17 +58,27 @@ return {
-- second key is the lefthand side of the map
-- navigate buffer tabs
["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
[']b'] = {
function()
require('astrocore.buffer').nav(vim.v.count1)
end,
desc = 'Next buffer',
},
['[b'] = {
function()
require('astrocore.buffer').nav(-vim.v.count1)
end,
desc = 'Previous buffer',
},
-- mappings seen under group name "Buffer"
["<Leader>bd"] = {
['<Leader>bd'] = {
function()
require("astroui.status.heirline").buffer_picker(
function(bufnr) require("astrocore.buffer").close(bufnr) end
)
require('astroui.status.heirline').buffer_picker(function(bufnr)
require('astrocore.buffer').close(bufnr)
end)
end,
desc = "Close buffer from tabline",
desc = 'Close buffer from tabline',
},
-- tables with just a `desc` key will be registered with which-key if it's installed
@@ -78,6 +88,11 @@ return {
-- setting a mapping to false will disable it
-- ["<C-S>"] = false,
},
v = {
['J'] = ":m '>+1<CR>gv=gv",
['K'] = ":m '<-2<CR>gv=gv",
},
},
},
}