mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
nvim: del v0.11 migrations.lua, lazydev support
This commit is contained in:
parent
7540d37422
commit
6fb3efd1dc
11 changed files with 80 additions and 92 deletions
|
|
@ -52,25 +52,54 @@ local keymaps_basic = { -- Modification of Original Keymap - Colemak
|
|||
opts = { desc = "Up", silent = true },
|
||||
},
|
||||
|
||||
{ mode = mode_arrow, keys = "h", cmd = "h", opts = { desc = "Left", silent = true } },
|
||||
{
|
||||
mode = mode_arrow,
|
||||
keys = "h",
|
||||
cmd = "h",
|
||||
opts = { desc = "Left", silent = true },
|
||||
},
|
||||
-- { mode = mode_arrow, keys = "i", cmd = "l", opts = { desc = "Right", silent = true } },
|
||||
{ mode = { "n" }, keys = "H", cmd = "<cmd>bprevious<CR>", opts = { desc = "Previous Buffer" } },
|
||||
{ mode = { "n" }, keys = "L", cmd = "<cmd>bnext<CR>", opts = { desc = "Next Buffer" } },
|
||||
{ mode = { "v", "o", "x" }, keys = "H", cmd = "^", opts = { desc = "Start of Line" } },
|
||||
{ mode = { "v", "o", "x" }, keys = "L", cmd = "$", opts = { desc = "End of Line" } },
|
||||
{ mode = mode_arrow, keys = "J", cmd = "5j", opts = { desc = "Up 5 Lines" } },
|
||||
{ mode = mode_arrow, keys = "K", cmd = "5e", opts = { desc = "Down 5 Lines" } },
|
||||
{ keys = "Y", cmd = "y$", opts = { desc = "Yank to End of Line" } },
|
||||
{ mode = mode_arrow, keys = "J", cmd = "5j" },
|
||||
{ mode = mode_arrow, keys = "K", cmd = "5k" },
|
||||
-- { mode = { "n", "o", "x" }, keys = "l", cmd = "i", opts = { desc = "Insert" } },
|
||||
-- { keys = "L", cmd = "I", opts = { desc = "Insert at Start of Line" } },
|
||||
-- { mode = mode_arrow, keys = "k", cmd = "n", opts = { desc = "Next Search" } },
|
||||
-- { mode = mode_arrow, keys = "K", cmd = "N", opts = { desc = "Previous Search" } },
|
||||
-- { mode = mode_arrow, keys = "j", cmd = "e", opts = { desc = "jump to end of word" } },
|
||||
-- { mode = mode_arrow, keys = "J", cmd = "E", opts = { desc = "jump to end of WORD" } },
|
||||
{
|
||||
mode = { "n" },
|
||||
keys = "H",
|
||||
cmd = "<cmd>bprevious<CR>",
|
||||
opts = { desc = "Previous Buffer" },
|
||||
},
|
||||
{
|
||||
mode = { "n" },
|
||||
keys = "L",
|
||||
cmd = "<cmd>bnext<CR>",
|
||||
opts = { desc = "Next Buffer" },
|
||||
},
|
||||
{
|
||||
mode = { "v", "o", "x" },
|
||||
keys = "H",
|
||||
cmd = "^",
|
||||
opts = { desc = "Start of Line" },
|
||||
},
|
||||
{
|
||||
mode = { "v", "o", "x" },
|
||||
keys = "L",
|
||||
cmd = "$",
|
||||
opts = { desc = "End of Line" },
|
||||
},
|
||||
{
|
||||
mode = mode_arrow,
|
||||
keys = "J",
|
||||
cmd = "5j",
|
||||
opts = { desc = "Up 5 Lines" },
|
||||
},
|
||||
{
|
||||
mode = mode_arrow,
|
||||
keys = "K",
|
||||
cmd = "5e",
|
||||
opts = { desc = "Down 5 Lines" },
|
||||
},
|
||||
{ keys = "Y", cmd = "y$", opts = { desc = "Yank to End of Line" } },
|
||||
{ mode = mode_arrow, keys = "J", cmd = "5j" },
|
||||
{ mode = mode_arrow, keys = "K", cmd = "5k" },
|
||||
-- https://github.com/LazyVim/LazyVim/blob/d1529f650fdd89cb620258bdeca5ed7b558420c7/lua/lazyvim/config/keymaps.lua#L60
|
||||
{ keys = "<Esc>", cmd = "<Cmd>nohlsearch<Bar>diffupdate<CR>", opts = { desc = "Clear Search Highlight" } },
|
||||
{ keys = "<Esc>", cmd = "<Cmd>nohlsearch<Bar>diffupdate<CR>", opts = { desc = "Clear Search Highlight" } },
|
||||
}
|
||||
|
||||
return keymaps_basic
|
||||
|
|
|
|||
|
|
@ -17,24 +17,14 @@ utils.set_keymaps(keymaps_basic)
|
|||
utils.set_keymaps(keymaps_nvim_tree_general)
|
||||
utils.set_keymaps(keymaps_modifier)
|
||||
|
||||
M.nvim_tree_keymaps = require("keymaps.nvim-tree").plugin
|
||||
|
||||
-- local function set_markdown_keymaps(bufnr)
|
||||
-- local opts = { noremap = true, silent = true, buffer = bufnr }
|
||||
-- vim.keymap.set("v", "`", 'c`<C-r>"`<Esc>', opts)
|
||||
-- end
|
||||
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = "markdown",
|
||||
-- callback = function()
|
||||
-- set_markdown_keymaps(0)
|
||||
-- end,
|
||||
-- })
|
||||
-- Added in neovim 0.11
|
||||
-- vim.keymap.del({ "n", "x" }, "grn")
|
||||
vim.keymap.del({ "n", "x" }, "gra")
|
||||
vim.keymap.del({ "n" }, "gri")
|
||||
|
||||
-- which-key.nvim
|
||||
if vim.g.loaded_which_key then
|
||||
require("keymaps.which")
|
||||
end
|
||||
require("keymaps.visual-multi")
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue