Compare commits
No commits in common. "9c70942dfb26d3a9fb548eea3a50d0e4ad9888f7" and "c7e7b39d8353ba83d5d5dcffbd89a67a4fe464dc" have entirely different histories.
9c70942dfb
...
c7e7b39d83
|
@ -120,7 +120,7 @@
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "build";
|
name = "nixos-build";
|
||||||
help = "use nom to build system";
|
help = "use nom to build system";
|
||||||
command =
|
command =
|
||||||
''
|
''
|
||||||
|
@ -128,17 +128,17 @@
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "apply";
|
name = "nixos-switch";
|
||||||
help = "wrapper for nixos-rebuild switch";
|
help = "wrapper for nixos-rebuild switch";
|
||||||
command = "sudo nixos-rebuild switch --flake . $@";
|
command = "sudo nixos-rebuild switch --flake . $@";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "test";
|
name = "nixos-test";
|
||||||
help = "wrapper for nixos-rebuild switch";
|
help = "wrapper for nixos-rebuild switch";
|
||||||
command = "sudo nixos-rebuild test --flake . $@";
|
command = "sudo nixos-rebuild test --flake . $@";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "boot";
|
name = "nixos-boot";
|
||||||
help = "wrapper for nixos-rebuild switch";
|
help = "wrapper for nixos-rebuild switch";
|
||||||
command = "sudo nixos-rebuild boot --flake . $@";
|
command = "sudo nixos-rebuild boot --flake . $@";
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,12 +31,13 @@ with builtins;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = trouble-nvim;
|
plugin = trouble-nvim;
|
||||||
cmd = [ "TodoTelescope" ];
|
|
||||||
keys = [
|
keys = [
|
||||||
{ key = "<leader>cD"; cmd = "<cmd>TroubleToggle document_diagnostics<cr>"; desc = "Document Diagnostics (Trouble)"; }
|
{ key = "<leader>xx"; 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>xX"; cmd = "<cmd>TroubleToggle workspace_diagnostics<cr>"; desc = "Workspace Diagnostics (Troule)"; }
|
||||||
{ key = "<leader>cl"; cmd = "<cmd>TroubleToggle loclist<cr>"; desc = "Location List (Trouble)"; }
|
{ key = "<leader>xl"; cmd = "<cmd>TroubleToggle loclist<cr>"; desc = "Location List (Trouble)"; }
|
||||||
{ key = "<leader>cq"; cmd = "<cmd>TroubleToggle quickfix<cr>"; desc = "Quickfix 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>ft"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
{ key = "<leader>ft"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
||||||
{
|
{
|
||||||
key = "[q";
|
key = "[q";
|
||||||
|
@ -222,7 +223,7 @@ with builtins;
|
||||||
];
|
];
|
||||||
cmd = [ "Telekasten" ];
|
cmd = [ "Telekasten" ];
|
||||||
keys = [
|
keys = [
|
||||||
{ key = "<leader>fz"; cmd = "<cmd>Telekasten<cr>"; desc = "Zettelkasten"; }
|
{ key = "<leader>z"; cmd = "<cmd>Telekasten<cr>"; desc = "zettelkasten"; }
|
||||||
];
|
];
|
||||||
conf = builtins.readFile ./lua/zettelkasten-nvim.lua;
|
conf = builtins.readFile ./lua/zettelkasten-nvim.lua;
|
||||||
}
|
}
|
||||||
|
@ -267,18 +268,26 @@ with builtins;
|
||||||
{
|
{
|
||||||
plugin = refactoring-nvim;
|
plugin = refactoring-nvim;
|
||||||
keys = [
|
keys = [
|
||||||
{
|
{ key = "<leader>re"; cmd = ": Refactor eextract "; desc = "Extract"; mode = [ "x" ]; }
|
||||||
key = "<leader>cR";
|
{ key = "<leader>rf"; cmd = ": Refactor extract_to_file "; desc = "Extract to file"; mode = [ "x" ]; }
|
||||||
cmd = "<cmd>lua require('telescope').extensions.refactoring.refactors()<cr>";
|
{ key = "<leader>rv"; cmd = ": Refactor extract_var "; desc = "Extract variable"; mode = [ "x" ]; }
|
||||||
desc = "Refactor";
|
{ key = "<leader>ri"; cmd = ": Refactor inline_var"; desc = "Inline variable"; mode = [ "n" "x" ]; }
|
||||||
mode = [ "x" "n" ];
|
{ 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" ]; }
|
||||||
];
|
];
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ plugin = which-key-nvim; }
|
{ plugin = which-key-nvim; }
|
||||||
{ plugin = plenary-nvim; }
|
{ plugin = plenary-nvim; }
|
||||||
{ plugin = nvim-lspconfig; }
|
{ plugin = nvim-lspconfig; }
|
||||||
];
|
];
|
||||||
|
init = /* lua */ ''
|
||||||
|
require("which-key").register({
|
||||||
|
["<leader>r"] = {
|
||||||
|
name = "refactoring",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
'';
|
||||||
opts = { };
|
opts = { };
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -286,22 +295,12 @@ with builtins;
|
||||||
keys = [
|
keys = [
|
||||||
{ key = "<leader>ha"; cmd = "<cmd>lua require('harpoon.mark').add_file()<cr>"; desc = "Add file"; }
|
{ 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>hh"; cmd = "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>"; desc = "Harpoon"; }
|
||||||
{ key = "<leader>1"; cmd = "<cmd>lua require('harpoon.ui').nav_file(1)<cr>"; desc = "Harpoon file 1"; }
|
{ key = "<leader>h1"; 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>h2"; 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>h3"; 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"; }
|
{ key = "<leader>h4"; cmd = "<cmd>lua require('harpoon.ui').nav_file(4)<cr>"; desc = "Harpoon file 4"; }
|
||||||
];
|
];
|
||||||
opts = { };
|
opts = { };
|
||||||
init = /* lua */ ''
|
|
||||||
require("which-key").register({
|
|
||||||
["<leader>h"] = {
|
|
||||||
name = "harpoon",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
'';
|
|
||||||
dependencies = [
|
|
||||||
{ plugin = which-key-nvim; }
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = nvim-puppeteer;
|
plugin = nvim-puppeteer;
|
||||||
|
@ -309,6 +308,7 @@ with builtins;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = neotest;
|
plugin = neotest;
|
||||||
|
lazy = false;
|
||||||
keys = [
|
keys = [
|
||||||
{ key = "<leader>ct"; cmd = "<cmd>lua require('neotest').summary.toggle()<cr>"; desc = "Test"; }
|
{ key = "<leader>ct"; cmd = "<cmd>lua require('neotest').summary.toggle()<cr>"; desc = "Test"; }
|
||||||
];
|
];
|
||||||
|
@ -317,7 +317,12 @@ with builtins;
|
||||||
{ plugin = FixCursorHold-nvim; }
|
{ plugin = FixCursorHold-nvim; }
|
||||||
|
|
||||||
# adapters
|
# adapters
|
||||||
{ plugin = neotest-python; }
|
{
|
||||||
|
plugin = neotest-python;
|
||||||
|
conf = /* lua */ ''
|
||||||
|
vim.opt.runtimepath:append("${neotest-python}")
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
conf = readFile ./lua/neotest.lua;
|
conf = readFile ./lua/neotest.lua;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
{ pkgs, lib, ... }:
|
|
||||||
|
|
||||||
with builtins;
|
|
||||||
{
|
|
||||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [
|
|
||||||
{
|
|
||||||
plugin = nvim-dap;
|
|
||||||
keys = [
|
|
||||||
{ key = "<leader>cb"; cmd = "<cmd>lua require('dap').toggle_breakpoint()<cr>"; desc = "Toggle breakpoint"; }
|
|
||||||
{ key = "<leader>cd"; cmd = "<cmd>lua require('dap').continue()<cr>"; desc = "Continue"; }
|
|
||||||
];
|
|
||||||
dependencies = [
|
|
||||||
{
|
|
||||||
plugin = nvim-dap-python;
|
|
||||||
ft = [ "python" ];
|
|
||||||
conf =
|
|
||||||
let
|
|
||||||
pythonWithDebugpy = pkgs.python3.withPackages (ps: with ps; [ debugpy ]);
|
|
||||||
in
|
|
||||||
/* lua */ ''
|
|
||||||
require("dap-python").setup("${lib.getExe pythonWithDebugpy}")
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugin = nvim-dap-virtual-text;
|
|
||||||
opts = { };
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugin = nvim-dap-ui;
|
|
||||||
opts = { };
|
|
||||||
conf = /* lua */ ''
|
|
||||||
local dap = require("dap")
|
|
||||||
local dapui = require("dapui")
|
|
||||||
dapui.setup(opts)
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
|
||||||
dapui.open({})
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
|
||||||
dapui.close({})
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
|
||||||
dapui.close({})
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -5,6 +5,8 @@ null_ls.setup({
|
||||||
-- Code actions
|
-- Code actions
|
||||||
null_ls.builtins.code_actions.shellcheck,
|
null_ls.builtins.code_actions.shellcheck,
|
||||||
null_ls.builtins.code_actions.statix,
|
null_ls.builtins.code_actions.statix,
|
||||||
|
-- Completion
|
||||||
|
null_ls.builtins.completion.spell,
|
||||||
-- Diagnostics
|
-- Diagnostics
|
||||||
null_ls.builtins.diagnostics.checkmake,
|
null_ls.builtins.diagnostics.checkmake,
|
||||||
null_ls.builtins.diagnostics.deadnix,
|
null_ls.builtins.diagnostics.deadnix,
|
||||||
|
@ -17,3 +19,19 @@ null_ls.setup({
|
||||||
null_ls.builtins.diagnostics.yamllint,
|
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,8 +32,9 @@ local on_attach_def = function(client, bufnr)
|
||||||
"Hover",
|
"Hover",
|
||||||
},
|
},
|
||||||
["<leader>"] = {
|
["<leader>"] = {
|
||||||
c = {
|
l = {
|
||||||
name = "code",
|
name = "lsp",
|
||||||
|
d = { vim.diagnostic.open_float, "Open diagnostic window" },
|
||||||
c = { require("actions-preview").code_actions, "Code action", mode = { "v", "n" } },
|
c = { require("actions-preview").code_actions, "Code action", mode = { "v", "n" } },
|
||||||
r = {
|
r = {
|
||||||
function()
|
function()
|
||||||
|
|
|
@ -11,7 +11,7 @@ require("statuscol").setup({
|
||||||
click = "v:lua.ScLa",
|
click = "v:lua.ScLa",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sign = { namespace = { "gitsigns*" }, auto = true },
|
sign = { name = { "GitSigns" }, auto = true },
|
||||||
click = "v:lua.ScSa",
|
click = "v:lua.ScSa",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,9 +35,11 @@ require("which-key").register({
|
||||||
["<leader>"] = {
|
["<leader>"] = {
|
||||||
f = { name = "file/find" },
|
f = { name = "file/find" },
|
||||||
g = { name = "git" },
|
g = { name = "git" },
|
||||||
c = { name = "code" },
|
l = { name = "lsp" },
|
||||||
|
o = { name = "org" },
|
||||||
s = { name = "search" },
|
s = { name = "search" },
|
||||||
t = { name = "toggle" },
|
t = { name = "toggle" },
|
||||||
|
x = { name = "diagnostics/quickfix" },
|
||||||
},
|
},
|
||||||
["["] = { name = "prev" },
|
["["] = { name = "prev" },
|
||||||
["]"] = { name = "next" },
|
["]"] = { name = "next" },
|
||||||
|
|
Loading…
Reference in New Issue