mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-29 06:18:34 +02:00
fix printable characters being mapped in select mode
most of the "visual mode" mappings use "v" instead of "x", affecting select mode, which should not have printable characters remapped. (this is felt when e.g. using snippets)
This commit is contained in:
parent
25abbf546d
commit
fa94c73362
13 changed files with 27 additions and 27 deletions
|
@ -17,14 +17,14 @@ return {
|
|||
end,
|
||||
keys = {
|
||||
{ "<c-s>", "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true },
|
||||
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
|
||||
{ "<leader>a", "", desc = "+ai", mode = { "n", "x" } },
|
||||
{
|
||||
"<leader>aa",
|
||||
function()
|
||||
return require("CopilotChat").toggle()
|
||||
end,
|
||||
desc = "Toggle (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>ax",
|
||||
|
@ -32,7 +32,7 @@ return {
|
|||
return require("CopilotChat").reset()
|
||||
end,
|
||||
desc = "Clear (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>aq",
|
||||
|
@ -46,7 +46,7 @@ return {
|
|||
end)
|
||||
end,
|
||||
desc = "Quick Chat (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>ap",
|
||||
|
@ -54,7 +54,7 @@ return {
|
|||
require("CopilotChat").select_prompt()
|
||||
end,
|
||||
desc = "Prompt Actions (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
|
|
|
@ -8,7 +8,7 @@ return {
|
|||
-- Populate the keys based on the user's options
|
||||
local opts = LazyVim.opts("mini.surround")
|
||||
local mappings = {
|
||||
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } },
|
||||
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "x" } },
|
||||
{ opts.mappings.delete, desc = "Delete Surrounding" },
|
||||
{ opts.mappings.find, desc = "Find Right Surrounding" },
|
||||
{ opts.mappings.find_left, desc = "Find Left Surrounding" },
|
||||
|
|
|
@ -84,7 +84,7 @@ return {
|
|||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "x"} },
|
||||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
|
|
|
@ -19,8 +19,8 @@ return {
|
|||
keys = {
|
||||
{ "<C-a>", function() return M.dial(true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
|
||||
{ "<C-x>", function() return M.dial(false) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
|
||||
{ "g<C-a>", function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
|
||||
{ "g<C-x>", function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
|
||||
{ "g<C-a>", function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "x"} },
|
||||
{ "g<C-x>", function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "x"} },
|
||||
},
|
||||
opts = function()
|
||||
local augend = require("dial.augend")
|
||||
|
|
|
@ -248,8 +248,8 @@ return {
|
|||
{ "<leader>sq", "<cmd>FzfLua quickfix<cr>", desc = "Quickfix List" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_cword"), desc = "Word (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_cword", { root = false }), desc = "Word (cwd)" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_visual"), mode = "v", desc = "Selection (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_visual", { root = false }), mode = "v", desc = "Selection (cwd)" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_visual"), mode = "x", desc = "Selection (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_visual", { root = false }), mode = "x", desc = "Selection (cwd)" },
|
||||
{ "<leader>uC", LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" },
|
||||
{
|
||||
"<leader>ss",
|
||||
|
|
|
@ -132,8 +132,8 @@ return {
|
|||
{ "<leader>sq", "<cmd>Telescope quickfix<cr>", desc = "Quickfix List" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_string", { root = false, word_match = "-w" }), desc = "Word (cwd)" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_string"), mode = "v", desc = "Selection (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_string", { root = false }), mode = "v", desc = "Selection (cwd)" },
|
||||
{ "<leader>sw", LazyVim.pick("grep_string"), mode = "x", desc = "Selection (Root Dir)" },
|
||||
{ "<leader>sW", LazyVim.pick("grep_string", { root = false }), mode = "x", desc = "Selection (cwd)" },
|
||||
{ "<leader>uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" },
|
||||
{
|
||||
"<leader>ss",
|
||||
|
|
|
@ -76,13 +76,13 @@ return {
|
|||
end
|
||||
|
||||
vim.keymap.set(
|
||||
{ "n", "v" },
|
||||
{ "n", "x" },
|
||||
"[c",
|
||||
"<CMD>call search('^; -\\+$', 'bw')<CR>",
|
||||
{ silent = true, buffer = true, desc = "Jumps to the begining of previous evaluation output." }
|
||||
)
|
||||
vim.keymap.set(
|
||||
{ "n", "v" },
|
||||
{ "n", "x" },
|
||||
"]c",
|
||||
"<CMD>call search('^; -\\+$', 'w')<CR>",
|
||||
{ silent = true, buffer = true, desc = "Jumps to the begining of next evaluation output." }
|
||||
|
|
|
@ -221,7 +221,7 @@ return {
|
|||
})
|
||||
wk.add({
|
||||
{
|
||||
mode = "v",
|
||||
mode = "x",
|
||||
buffer = args.buf,
|
||||
{ "<leader>cx", group = "extract" },
|
||||
{
|
||||
|
|
|
@ -17,12 +17,12 @@ return {
|
|||
-- of files supported by R.nvim. This is an
|
||||
-- opportunity to create mappings local to buffers.
|
||||
vim.keymap.set("n", "<Enter>", "<Plug>RDSendLine", { buffer = true })
|
||||
vim.keymap.set("v", "<Enter>", "<Plug>RSendSelection", { buffer = true })
|
||||
vim.keymap.set("x", "<Enter>", "<Plug>RSendSelection", { buffer = true })
|
||||
|
||||
local wk = require("which-key")
|
||||
wk.add({
|
||||
buffer = true,
|
||||
mode = { "n", "v" },
|
||||
mode = { "n", "x" },
|
||||
{ "<localleader>a", group = "all" },
|
||||
{ "<localleader>b", group = "between marks" },
|
||||
{ "<localleader>c", group = "chunks" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue