1

Modules/Neovim: Add binding to show rmpc in neovim

This commit is contained in:
2025-07-06 03:47:11 +02:00
parent 0816bddccb
commit 2d602b716a
3 changed files with 22 additions and 3 deletions

View File

@ -1643,6 +1643,7 @@ in {
cmd = ["ToggleTerm"];
keys = ["<C-/>"];
config = mkDefaultConfig name;
opts = {
open_mapping.__raw = "[[<C-/>]]";
autochdir = true;
@ -1651,16 +1652,19 @@ in {
shading_factor = 30; # Default is -30 to darken the terminal
start_in_insert = true;
terminal_mappings = true;
persist_mode = true;
size = 20;
persist_size = true;
persist_mode = false; # Don't persist the current mode (insert/normal)
insert_mappings = true;
close_on_exit = true;
shell = "fish";
direction = "horizontal"; # 'vertical' | 'horizontal' | 'window' | 'float'
auto_scroll = true;
float_opts = {
border = "curved"; # 'single' | 'double' | 'shadow' | 'curved'
width = 80;
height = 45;
height = 80;
winblend = 0;
};
};

View File

@ -54,3 +54,12 @@ vim.api.nvim_create_user_command("ToggleAutoLint", function()
end, {
desc = "Toggle autolint-on-save",
})
-- Toggle Rcmp
local Terminal = require("toggleterm.terminal").Terminal
local rmcp =
Terminal:new({ cmd = "rmpc", hidden = true, close_on_exit = true, auto_scroll = false, direction = "float" })
vim.g.toggle_rcmp = function()
rmcp:toggle()
end

View File

@ -324,10 +324,16 @@ _: let
}
{
mode = "n";
key = "<leader>r";
key = "<leader>R";
action = "<cmd>lua Snacks.picker.resume()<cr>";
options.desc = "Last Picker";
}
{
mode = "n";
key = "<leader>r";
action = "<cmd>lua vim.g.toggle_rcmp()<cr>"; # Defined in extraConfigLua.lua
options.desc = "Show Rcmp";
}
{
mode = "n";
key = "<leader>i";