add refactoring
This commit is contained in:
@@ -93,11 +93,6 @@
|
||||
}
|
||||
|
||||
# Tabs
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>t";
|
||||
action = "+tab";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tn";
|
||||
@@ -133,11 +128,6 @@
|
||||
}
|
||||
|
||||
# Trouble
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>d";
|
||||
action = "+diagnostics/debug";
|
||||
}
|
||||
{
|
||||
key = "<leader>dt";
|
||||
action = "<CMD>TroubleToggle<CR>";
|
||||
@@ -145,11 +135,6 @@
|
||||
}
|
||||
|
||||
# Rust
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>r";
|
||||
action = "+rust";
|
||||
}
|
||||
{
|
||||
# Start standalone rust-analyzer (fixes issues when opening files from nvim tree)
|
||||
mode = "n";
|
||||
@@ -157,5 +142,37 @@
|
||||
action = "<CMD>RustStartStandaloneServerForBuffer<CR>";
|
||||
options.desc = "Start standalone rust-analyzer";
|
||||
}
|
||||
|
||||
# refactoring
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>re";
|
||||
action = ":Refactor extract_var ";
|
||||
options.desc = "Extract to variable";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>rE";
|
||||
action = ":Refactor extract ";
|
||||
options.desc = "Extract to function";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>rb";
|
||||
action = ":Refactor extract_block ";
|
||||
options.desc = "Extract to block";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ri";
|
||||
action = ":Refactor inline_var ";
|
||||
options.desc = "Inline variable";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>rI";
|
||||
action = ":Refactor inline_func ";
|
||||
options.desc = "Inline function";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user