refactor(nvim): keybinding mess
parent
8bc546daf0
commit
528098839d
|
@ -31,13 +31,12 @@ with builtins;
|
|||
}
|
||||
{
|
||||
plugin = trouble-nvim;
|
||||
cmd = [ "TodoTelescope" ];
|
||||
keys = [
|
||||
{ key = "<leader>xx"; cmd = "<cmd>TroubleToggle document_diagnostics<cr>"; desc = "Document Diagnostics (Trouble)"; }
|
||||
{ key = "<leader>xX"; cmd = "<cmd>TroubleToggle workspace_diagnostics<cr>"; desc = "Workspace Diagnostics (Troule)"; }
|
||||
{ key = "<leader>xl"; cmd = "<cmd>TroubleToggle loclist<cr>"; desc = "Location List (Trouble)"; }
|
||||
{ key = "<leader>xq"; cmd = "<cmd>TroubleToggle quickfix<cr>"; desc = "Quickfix List (Trouble)"; }
|
||||
{ key = "<leader>xt"; cmd = "<cmd>TodoTrouble<cr>"; desc = "Todo (Trouble)"; }
|
||||
{ key = "<leader>xT"; cmd = "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>"; desc = "Todo/Fix/Fixme (Trouble)"; }
|
||||
{ key = "<leader>cD"; cmd = "<cmd>TroubleToggle document_diagnostics<cr>"; desc = "Document Diagnostics (Trouble)"; }
|
||||
{ key = "<leader>cW"; cmd = "<cmd>TroubleToggle workspace_diagnostics<cr>"; desc = "Workspace Diagnostics (Trouble)"; }
|
||||
{ key = "<leader>cl"; cmd = "<cmd>TroubleToggle loclist<cr>"; desc = "Location List (Trouble)"; }
|
||||
{ key = "<leader>cq"; cmd = "<cmd>TroubleToggle quickfix<cr>"; desc = "Quickfix List (Trouble)"; }
|
||||
{ key = "<leader>ft"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
||||
{
|
||||
key = "[q";
|
||||
|
@ -223,7 +222,7 @@ with builtins;
|
|||
];
|
||||
cmd = [ "Telekasten" ];
|
||||
keys = [
|
||||
{ key = "<leader>z"; cmd = "<cmd>Telekasten<cr>"; desc = "zettelkasten"; }
|
||||
{ key = "<leader>fz"; cmd = "<cmd>Telekasten<cr>"; desc = "Zettelkasten"; }
|
||||
];
|
||||
conf = builtins.readFile ./lua/zettelkasten-nvim.lua;
|
||||
}
|
||||
|
@ -268,26 +267,18 @@ with builtins;
|
|||
{
|
||||
plugin = refactoring-nvim;
|
||||
keys = [
|
||||
{ key = "<leader>re"; cmd = ": Refactor eextract "; desc = "Extract"; mode = [ "x" ]; }
|
||||
{ key = "<leader>rf"; cmd = ": Refactor extract_to_file "; desc = "Extract to file"; mode = [ "x" ]; }
|
||||
{ key = "<leader>rv"; cmd = ": Refactor extract_var "; desc = "Extract variable"; mode = [ "x" ]; }
|
||||
{ key = "<leader>ri"; cmd = ": Refactor inline_var"; desc = "Inline variable"; mode = [ "n" "x" ]; }
|
||||
{ key = "<leader>rI"; cmd = ": Refactor inline_func"; desc = "Inline function"; mode = [ "n" "x" ]; }
|
||||
{ key = "<leader>rb"; cmd = ": Refactor extract_block"; desc = "Extract block"; mode = [ "n" ]; }
|
||||
{ key = "<leader>rbf"; cmd = ": Refactor extract_block_to_file"; desc = "Extract block to file"; mode = [ "n" ]; }
|
||||
{
|
||||
key = "<leader>cR";
|
||||
cmd = "<cmd>lua require('telescope').extensions.refactoring.refactors()<cr>";
|
||||
desc = "Refactor";
|
||||
mode = [ "x" "n" ];
|
||||
}
|
||||
];
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = plenary-nvim; }
|
||||
{ plugin = nvim-lspconfig; }
|
||||
];
|
||||
init = /* lua */ ''
|
||||
require("which-key").register({
|
||||
["<leader>r"] = {
|
||||
name = "refactoring",
|
||||
},
|
||||
})
|
||||
'';
|
||||
opts = { };
|
||||
}
|
||||
{
|
||||
|
@ -295,12 +286,22 @@ with builtins;
|
|||
keys = [
|
||||
{ key = "<leader>ha"; cmd = "<cmd>lua require('harpoon.mark').add_file()<cr>"; desc = "Add file"; }
|
||||
{ key = "<leader>hh"; cmd = "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>"; desc = "Harpoon"; }
|
||||
{ key = "<leader>h1"; cmd = "<cmd>lua require('harpoon.ui').nav_file(1)<cr>"; desc = "Harpoon file 1"; }
|
||||
{ key = "<leader>h2"; cmd = "<cmd>lua require('harpoon.ui').nav_file(2)<cr>"; desc = "Harpoon file 2"; }
|
||||
{ key = "<leader>h3"; cmd = "<cmd>lua require('harpoon.ui').nav_file(3)<cr>"; desc = "Harpoon file 3"; }
|
||||
{ key = "<leader>h4"; cmd = "<cmd>lua require('harpoon.ui').nav_file(4)<cr>"; desc = "Harpoon file 4"; }
|
||||
{ key = "<leader>1"; cmd = "<cmd>lua require('harpoon.ui').nav_file(1)<cr>"; desc = "Harpoon file 1"; }
|
||||
{ key = "<leader>2"; cmd = "<cmd>lua require('harpoon.ui').nav_file(2)<cr>"; desc = "Harpoon file 2"; }
|
||||
{ key = "<leader>3"; cmd = "<cmd>lua require('harpoon.ui').nav_file(3)<cr>"; desc = "Harpoon file 3"; }
|
||||
{ key = "<leader>4"; cmd = "<cmd>lua require('harpoon.ui').nav_file(4)<cr>"; desc = "Harpoon file 4"; }
|
||||
];
|
||||
opts = { };
|
||||
init = /* lua */ ''
|
||||
require("which-key").register({
|
||||
["<leader>h"] = {
|
||||
name = "harpoon",
|
||||
},
|
||||
})
|
||||
'';
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = nvim-puppeteer;
|
||||
|
@ -308,7 +309,6 @@ with builtins;
|
|||
}
|
||||
{
|
||||
plugin = neotest;
|
||||
lazy = false;
|
||||
keys = [
|
||||
{ key = "<leader>ct"; cmd = "<cmd>lua require('neotest').summary.toggle()<cr>"; desc = "Test"; }
|
||||
];
|
||||
|
@ -317,12 +317,7 @@ with builtins;
|
|||
{ plugin = FixCursorHold-nvim; }
|
||||
|
||||
# adapters
|
||||
{
|
||||
plugin = neotest-python;
|
||||
conf = /* lua */ ''
|
||||
vim.opt.runtimepath:append("${neotest-python}")
|
||||
'';
|
||||
}
|
||||
{ plugin = neotest-python; }
|
||||
];
|
||||
conf = readFile ./lua/neotest.lua;
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@ null_ls.setup({
|
|||
-- Code actions
|
||||
null_ls.builtins.code_actions.shellcheck,
|
||||
null_ls.builtins.code_actions.statix,
|
||||
-- Completion
|
||||
null_ls.builtins.completion.spell,
|
||||
-- Diagnostics
|
||||
null_ls.builtins.diagnostics.checkmake,
|
||||
null_ls.builtins.diagnostics.deadnix,
|
||||
|
@ -19,19 +17,3 @@ null_ls.setup({
|
|||
null_ls.builtins.diagnostics.yamllint,
|
||||
},
|
||||
})
|
||||
|
||||
-- disable (c)spell initially
|
||||
null_ls.disable("spell")
|
||||
|
||||
-- make sources toggle able
|
||||
require("which-key").register({
|
||||
n = {
|
||||
name = "null-ls",
|
||||
s = {
|
||||
function()
|
||||
null_ls.toggle("spell")
|
||||
end,
|
||||
"spell",
|
||||
},
|
||||
},
|
||||
}, { prefix = "<leader>t" })
|
||||
|
|
|
@ -32,9 +32,8 @@ local on_attach_def = function(client, bufnr)
|
|||
"Hover",
|
||||
},
|
||||
["<leader>"] = {
|
||||
l = {
|
||||
name = "lsp",
|
||||
d = { vim.diagnostic.open_float, "Open diagnostic window" },
|
||||
c = {
|
||||
name = "code",
|
||||
c = { require("actions-preview").code_actions, "Code action", mode = { "v", "n" } },
|
||||
r = {
|
||||
function()
|
||||
|
|
|
@ -35,11 +35,9 @@ require("which-key").register({
|
|||
["<leader>"] = {
|
||||
f = { name = "file/find" },
|
||||
g = { name = "git" },
|
||||
l = { name = "lsp" },
|
||||
o = { name = "org" },
|
||||
c = { name = "code" },
|
||||
s = { name = "search" },
|
||||
t = { name = "toggle" },
|
||||
x = { name = "diagnostics/quickfix" },
|
||||
},
|
||||
["["] = { name = "prev" },
|
||||
["]"] = { name = "next" },
|
||||
|
|
Loading…
Reference in New Issue