Modules/Neovim: Add binding to show rmpc in neovim
This commit is contained in:
@ -1643,6 +1643,7 @@ in {
|
|||||||
cmd = ["ToggleTerm"];
|
cmd = ["ToggleTerm"];
|
||||||
keys = ["<C-/>"];
|
keys = ["<C-/>"];
|
||||||
config = mkDefaultConfig name;
|
config = mkDefaultConfig name;
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
open_mapping.__raw = "[[<C-/>]]";
|
open_mapping.__raw = "[[<C-/>]]";
|
||||||
autochdir = true;
|
autochdir = true;
|
||||||
@ -1651,16 +1652,19 @@ in {
|
|||||||
shading_factor = 30; # Default is -30 to darken the terminal
|
shading_factor = 30; # Default is -30 to darken the terminal
|
||||||
start_in_insert = true;
|
start_in_insert = true;
|
||||||
terminal_mappings = 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;
|
insert_mappings = true;
|
||||||
close_on_exit = true;
|
close_on_exit = true;
|
||||||
shell = "fish";
|
shell = "fish";
|
||||||
direction = "horizontal"; # 'vertical' | 'horizontal' | 'window' | 'float'
|
direction = "horizontal"; # 'vertical' | 'horizontal' | 'window' | 'float'
|
||||||
auto_scroll = true;
|
auto_scroll = true;
|
||||||
|
|
||||||
float_opts = {
|
float_opts = {
|
||||||
border = "curved"; # 'single' | 'double' | 'shadow' | 'curved'
|
border = "curved"; # 'single' | 'double' | 'shadow' | 'curved'
|
||||||
width = 80;
|
width = 80;
|
||||||
height = 45;
|
height = 80;
|
||||||
winblend = 0;
|
winblend = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -54,3 +54,12 @@ vim.api.nvim_create_user_command("ToggleAutoLint", function()
|
|||||||
end, {
|
end, {
|
||||||
desc = "Toggle autolint-on-save",
|
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
|
||||||
|
@ -324,10 +324,16 @@ _: let
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>r";
|
key = "<leader>R";
|
||||||
action = "<cmd>lua Snacks.picker.resume()<cr>";
|
action = "<cmd>lua Snacks.picker.resume()<cr>";
|
||||||
options.desc = "Last Picker";
|
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";
|
mode = "n";
|
||||||
key = "<leader>i";
|
key = "<leader>i";
|
||||||
|
Reference in New Issue
Block a user