move keymaps
This commit is contained in:
parent
1b22c5ab20
commit
dee6c49b0c
6 changed files with 22 additions and 10 deletions
.config/nvim/lua
|
@ -762,4 +762,15 @@ M.surround = {
|
||||||
change_line = "cS",
|
change_line = "cS",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M.aerial = {
|
||||||
|
["[y"] = "actions.prev",
|
||||||
|
["]y"] = "actions.next",
|
||||||
|
["[Y"] = "actions.prev_up",
|
||||||
|
["]Y"] = "actions.next_up",
|
||||||
|
["{"] = false,
|
||||||
|
["}"] = false,
|
||||||
|
["[["] = false,
|
||||||
|
["]]"] = false,
|
||||||
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -249,6 +249,7 @@ local function has_capability(capability, filter)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- NOTE: LSP Keymaps here
|
-- NOTE: LSP Keymaps here
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
function M.lsp_on_attach(client, bufnr)
|
function M.lsp_on_attach(client, bufnr)
|
||||||
local lsp_mappings = M.empty_map_table()
|
local lsp_mappings = M.empty_map_table()
|
||||||
|
|
||||||
|
|
|
@ -16,16 +16,7 @@ M.opts = {
|
||||||
nested_top = "│ ",
|
nested_top = "│ ",
|
||||||
whitespace = " ",
|
whitespace = " ",
|
||||||
},
|
},
|
||||||
keymaps = {
|
keymaps = require("config.keymaps").aerial,
|
||||||
["[y"] = "actions.prev",
|
|
||||||
["]y"] = "actions.next",
|
|
||||||
["[Y"] = "actions.prev_up",
|
|
||||||
["]Y"] = "actions.next_up",
|
|
||||||
["{"] = false,
|
|
||||||
["}"] = false,
|
|
||||||
["[["] = false,
|
|
||||||
["]]"] = false,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -20,6 +20,7 @@ local opts = function()
|
||||||
height = 0.80,
|
height = 0.80,
|
||||||
preview_cutoff = 120,
|
preview_cutoff = 120,
|
||||||
},
|
},
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
mappings = {
|
mappings = {
|
||||||
i = {
|
i = {
|
||||||
["<C-n>"] = actions.cycle_history_next,
|
["<C-n>"] = actions.cycle_history_next,
|
||||||
|
|
|
@ -10,6 +10,7 @@ M.opts = {
|
||||||
return vim.o.colums * 0.33
|
return vim.o.colums * 0.33
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
open_mapping = "<C-z>",
|
open_mapping = "<C-z>",
|
||||||
direction = "float",
|
direction = "float",
|
||||||
highlights = {
|
highlights = {
|
||||||
|
|
|
@ -56,6 +56,7 @@ M.opts = {
|
||||||
select = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
lookahead = true,
|
lookahead = true,
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
keymaps = {
|
keymaps = {
|
||||||
["ak"] = { query = "@block.outer", desc = "around block" },
|
["ak"] = { query = "@block.outer", desc = "around block" },
|
||||||
["ik"] = { query = "@block.inner", desc = "inside block" },
|
["ik"] = { query = "@block.inner", desc = "inside block" },
|
||||||
|
@ -74,21 +75,25 @@ M.opts = {
|
||||||
move = {
|
move = {
|
||||||
enable = true,
|
enable = true,
|
||||||
set_jumps = true,
|
set_jumps = true,
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
goto_next_start = {
|
goto_next_start = {
|
||||||
["]k"] = { query = "@block.outer", desc = "Next block start" },
|
["]k"] = { query = "@block.outer", desc = "Next block start" },
|
||||||
["]f"] = { query = "@function.outer", desc = "Next function start" },
|
["]f"] = { query = "@function.outer", desc = "Next function start" },
|
||||||
["]a"] = { query = "@parameter.inner", desc = "Next argument start" },
|
["]a"] = { query = "@parameter.inner", desc = "Next argument start" },
|
||||||
},
|
},
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
goto_next_end = {
|
goto_next_end = {
|
||||||
["]K"] = { query = "@block.outer", desc = "Next block end" },
|
["]K"] = { query = "@block.outer", desc = "Next block end" },
|
||||||
["]F"] = { query = "@function.outer", desc = "Next function end" },
|
["]F"] = { query = "@function.outer", desc = "Next function end" },
|
||||||
["]A"] = { query = "@parameter.inner", desc = "Next argument end" },
|
["]A"] = { query = "@parameter.inner", desc = "Next argument end" },
|
||||||
},
|
},
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
goto_previous_start = {
|
goto_previous_start = {
|
||||||
["[k"] = { query = "@block.outer", desc = "Previous block start" },
|
["[k"] = { query = "@block.outer", desc = "Previous block start" },
|
||||||
["[f"] = { query = "@function.outer", desc = "Previous function start" },
|
["[f"] = { query = "@function.outer", desc = "Previous function start" },
|
||||||
["[a"] = { query = "@parameter.inner", desc = "Previous argument start" },
|
["[a"] = { query = "@parameter.inner", desc = "Previous argument start" },
|
||||||
},
|
},
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
goto_previous_end = {
|
goto_previous_end = {
|
||||||
["[K"] = { query = "@block.outer", desc = "Previous block end" },
|
["[K"] = { query = "@block.outer", desc = "Previous block end" },
|
||||||
["[F"] = { query = "@function.outer", desc = "Previous function end" },
|
["[F"] = { query = "@function.outer", desc = "Previous function end" },
|
||||||
|
@ -97,11 +102,13 @@ M.opts = {
|
||||||
},
|
},
|
||||||
swap = {
|
swap = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
swap_next = {
|
swap_next = {
|
||||||
[">K"] = { query = "@block.outer", desc = "Swap next block" },
|
[">K"] = { query = "@block.outer", desc = "Swap next block" },
|
||||||
[">F"] = { query = "@function.outer", desc = "Swap next function" },
|
[">F"] = { query = "@function.outer", desc = "Swap next function" },
|
||||||
[">A"] = { query = "@parameter.inner", desc = "Swap next argument" },
|
[">A"] = { query = "@parameter.inner", desc = "Swap next argument" },
|
||||||
},
|
},
|
||||||
|
-- TODO: Move to config.keymaps
|
||||||
swap_previous = {
|
swap_previous = {
|
||||||
["<K"] = { query = "@block.outer", desc = "Swap previous block" },
|
["<K"] = { query = "@block.outer", desc = "Swap previous block" },
|
||||||
["<F"] = { query = "@function.outer", desc = "Swap previous function" },
|
["<F"] = { query = "@function.outer", desc = "Swap previous function" },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue