From 02d9e30ce77eb35117797640fda6b377a5c1a990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 27 Oct 2023 09:00:02 +0200 Subject: [PATCH 01/11] feat(tmux): add tmux-new script --- modules/programs/hyprland/_config.nix | 2 +- modules/programs/tmux/default.nix | 20 +++++++++++++++---- .../tmux/tmux-sessionizer/script.fish | 6 +----- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/modules/programs/hyprland/_config.nix b/modules/programs/hyprland/_config.nix index 8c09f4b..cbeabbf 100644 --- a/modules/programs/hyprland/_config.nix +++ b/modules/programs/hyprland/_config.nix @@ -155,7 +155,7 @@ in bind = $mainMod , M , exec , hyprctl keyword general:layout master bind = $mainMod , R , exec , rofi -show combi bind = $mainMod , RETURN , exec , kitty - bind = $mainMod SHIFT , RETURN , exec , kitty -- tmux new -A -s home + bind = $mainMod SHIFT , RETURN , exec , kitty -- tmux new "ts || tn home ~" # XF86 keys binde = , XF86AudioLowerVolume , exec , pamixer -d 5 diff --git a/modules/programs/tmux/default.nix b/modules/programs/tmux/default.nix index 67a4d5f..8df5809 100644 --- a/modules/programs/tmux/default.nix +++ b/modules/programs/tmux/default.nix @@ -7,8 +7,7 @@ let tmux-switch = pkgs.writeShellApplication { name = "tmux-switch"; runtimeInputs = with pkgs; [ tmux ]; - text = '' - #!/usr/bin/env bash + text = /* bash */ '' if [[ -z ''${TMUX+x} ]]; then tmux attach -t "$1" else @@ -19,7 +18,7 @@ let tmux-sessionizer = pkgs.writeFishApplication { name = "ts"; - runtimeInputs = with pkgs; [ tmux findutils coreutils procps fd tmux-switch gawk ]; + runtimeInputs = with pkgs; [ tmux findutils coreutils procps fd tmux-new gawk ]; text = readFile ./tmux-sessionizer/script.fish; completions = readFile ./tmux-sessionizer/completions.fish; }; @@ -31,6 +30,17 @@ let completions = readFile ./tmux-attach/completions.fish; }; + tmux-new = pkgs.writeFishApplication { + name = "tn"; + runtimeInputs = with pkgs; [ tmux ]; + text = /* fish */ '' + if ! tmux has-session -t $argv[1] 2> /dev/null + tmux new-session -ds $argv[1] -c $argv[2] + end + + tmux-switch $argv[1] + ''; + }; in { options.my.programs.tmux = { @@ -60,6 +70,8 @@ in home-manager.users.moritz.home.packages = [ tmux-sessionizer tmux-attach + tmux-switch + tmux-new ]; home-manager.users.moritz.programs = { tmux = { @@ -97,7 +109,7 @@ in if ! fish_is_root_user && test "$TERM_PROGRAM" != 'vscode' && ${insideVariableMissing} if test -z $tmux_autostarted set -x tmux_autostarted true - tmux new -A -s home + tn home ~ end end ''; diff --git a/modules/programs/tmux/tmux-sessionizer/script.fish b/modules/programs/tmux/tmux-sessionizer/script.fish index a5e957b..b9501a5 100755 --- a/modules/programs/tmux/tmux-sessionizer/script.fish +++ b/modules/programs/tmux/tmux-sessionizer/script.fish @@ -13,8 +13,4 @@ if not test -n "$selected_name" exit 1 end -if ! tmux has-session -t $selected_name 2> /dev/null - tmux new-session -ds $selected_name -c $selected -end - -tmux-switch $selected_name +tn "$selected_name" "$selected" From 70a01fd0a4850c4d4da5ad73a8a1c1358e033930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 27 Oct 2023 09:00:36 +0200 Subject: [PATCH 02/11] fix(nvim): remove lsp signature completely --- modules/programs/nvim/plugins/lua/nvim-lspconfig.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/modules/programs/nvim/plugins/lua/nvim-lspconfig.lua b/modules/programs/nvim/plugins/lua/nvim-lspconfig.lua index bfc510b..44d969d 100644 --- a/modules/programs/nvim/plugins/lua/nvim-lspconfig.lua +++ b/modules/programs/nvim/plugins/lua/nvim-lspconfig.lua @@ -106,13 +106,6 @@ local on_attach_def = function(client, bufnr) vim.lsp.inlay_hint(bufnr, true) end, timeout) end - - require("lsp_signature").on_attach({ - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { - border = "rounded", - }, - }, bufnr) end local lspconfig_default_options = { From 54c907ff3b9e2171eb4b3e0dad2c6465313946ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 27 Oct 2023 15:32:00 +0200 Subject: [PATCH 03/11] feat: keep jetbrains ide state --- hosts/nixos-laptop/impermanence.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/nixos-laptop/impermanence.nix b/hosts/nixos-laptop/impermanence.nix index c021d7b..13bcc83 100644 --- a/hosts/nixos-laptop/impermanence.nix +++ b/hosts/nixos-laptop/impermanence.nix @@ -40,6 +40,8 @@ ".local/share/direnv" ".local/share/nvim" ".local/share/zoxide" + ".local/share/JetBrains" + ".config/JetBrains" ".local/state/nvim" ".config/kdeconnect" ".cat_installer" # eduroam From 37ad1080e73121ede9bb6c2411e93ade3c000ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 27 Oct 2023 19:30:27 +0200 Subject: [PATCH 04/11] feat(nvim)!: use stable telescope --- flake.nix | 2 -- overlays/vimPlugins.nix | 5 ----- 2 files changed, 7 deletions(-) diff --git a/flake.nix b/flake.nix index 1d8f87f..a4e0f0a 100644 --- a/flake.nix +++ b/flake.nix @@ -49,8 +49,6 @@ smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim"; telekasten-nvim.flake = false; telekasten-nvim.url = "github:renerocksai/telekasten.nvim"; - telescope-nvim.flake = false; - telescope-nvim.url = "github:nvim-telescope/telescope.nvim"; none-ls-nvim.flake = false; none-ls-nvim.url = "github:nvimtools/none-ls.nvim"; diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index 401de8b..8b340d4 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -30,11 +30,6 @@ with lib.my; src = inputs.actions-preview-nvim; }; - telescope-nvim = prev.vimPlugins.telescope-nvim.overrideAttrs (_: { - version = mkVersionInput inputs.telescope-nvim; - src = inputs.telescope-nvim; - }); - nvim-treesitter = prev.vimPlugins.nvim-treesitter.overrideAttrs (_: { version = mkVersionInput inputs.nvim-treesitter; src = inputs.nvim-treesitter; From 844c7a98765d93135dc1f15bf4b0ed5786f0934b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 27 Oct 2023 19:31:03 +0200 Subject: [PATCH 05/11] feat(nvim): add neotest plugin --- flake.lock | 35 ++++++++++--------- flake.nix | 2 ++ modules/programs/nvim/plugins/coding.nix | 20 +++++++++++ modules/programs/nvim/plugins/lua/neotest.lua | 7 ++++ overlays/vimPlugins.nix | 7 +++- 5 files changed, 53 insertions(+), 18 deletions(-) create mode 100644 modules/programs/nvim/plugins/lua/neotest.lua diff --git a/flake.lock b/flake.lock index bcfc87f..57bc135 100644 --- a/flake.lock +++ b/flake.lock @@ -621,6 +621,23 @@ "type": "github" } }, + "neotest-python": { + "flake": false, + "locked": { + "lastModified": 1698425037, + "narHash": "sha256-C3Dw+fl1QNYU9tg0fE52EzOqeGXxu1vq5SPmDnv2LD8=", + "owner": "MoritzBoehme", + "repo": "neotest-python", + "rev": "3c09dbafb0a1e3ac8b19eabc7157ec312cc2f2ee", + "type": "github" + }, + "original": { + "owner": "MoritzBoehme", + "ref": "fix-runtimepath-search", + "repo": "neotest-python", + "type": "github" + } + }, "neovim-flake": { "inputs": { "flake-utils": "flake-utils_2", @@ -1091,6 +1108,7 @@ "hyprpaper": "hyprpaper", "impermanence": "impermanence", "master": "master", + "neotest-python": "neotest-python", "neovim-nightly-overlay": "neovim-nightly-overlay", "nix-index-database": "nix-index-database", "nix-lazy-nvim": "nix-lazy-nvim", @@ -1106,7 +1124,6 @@ "smartcolumn-nvim": "smartcolumn-nvim", "stable": "stable", "telekasten-nvim": "telekasten-nvim", - "telescope-nvim": "telescope-nvim", "timers": "timers" } }, @@ -1248,22 +1265,6 @@ "type": "github" } }, - "telescope-nvim": { - "flake": false, - "locked": { - "lastModified": 1696709104, - "narHash": "sha256-v68sId4cWHneUaaYp2neVtBobNZo8lsxKoBhRF4yZrI=", - "owner": "nvim-telescope", - "repo": "telescope.nvim", - "rev": "5a747a9587e4bfc4ae086a38cc679fe54f983b69", - "type": "github" - }, - "original": { - "owner": "nvim-telescope", - "repo": "telescope.nvim", - "type": "github" - } - }, "timers": { "inputs": { "naersk": "naersk", diff --git a/flake.nix b/flake.nix index a4e0f0a..d21f71f 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,8 @@ telekasten-nvim.url = "github:renerocksai/telekasten.nvim"; none-ls-nvim.flake = false; none-ls-nvim.url = "github:nvimtools/none-ls.nvim"; + neotest-python.flake = false; + neotest-python.url = "github:MoritzBoehme/neotest-python/fix-runtimepath-search"; # Hyprland hypr-contrib.url = "github:hyprwm/contrib"; diff --git a/modules/programs/nvim/plugins/coding.nix b/modules/programs/nvim/plugins/coding.nix index 955be6f..5c5a168 100644 --- a/modules/programs/nvim/plugins/coding.nix +++ b/modules/programs/nvim/plugins/coding.nix @@ -306,5 +306,25 @@ with builtins; plugin = nvim-puppeteer; lazy = false; # NOTE: plugin lazy-loads itself. } + { + plugin = neotest; + lazy = false; + keys = [ + { key = "ct"; cmd = "lua require('neotest').summary.toggle()"; desc = "Test"; } + ]; + dependencies = [ + { plugin = plenary-nvim; } + { plugin = FixCursorHold-nvim; } + + # adapters + { + plugin = neotest-python; + conf = /* lua */ '' + vim.opt.runtimepath:append("${neotest-python}") + ''; + } + ]; + conf = readFile ./lua/neotest.lua; + } ]; } diff --git a/modules/programs/nvim/plugins/lua/neotest.lua b/modules/programs/nvim/plugins/lua/neotest.lua new file mode 100644 index 0000000..4df1b8c --- /dev/null +++ b/modules/programs/nvim/plugins/lua/neotest.lua @@ -0,0 +1,7 @@ +require("neotest").setup({ + adapters = { + require("neotest-python")({ + dap = { justMyCode = false }, + }), + }, +}) diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index 8b340d4..f76f56c 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -47,9 +47,14 @@ with lib.my; src = inputs.nvim-puppeteer; }; - null-ls-nvim = prev.vimPlugins.null-ls-nvim.overrideAttrs (a: { + null-ls-nvim = prev.vimPlugins.null-ls-nvim.overrideAttrs (_: { version = mkVersionInput inputs.none-ls-nvim; src = inputs.none-ls-nvim; }); + + neotest-python = prev.vimPlugins.neotest-python.overrideAttrs (_: { + version = mkVersionInput inputs.neotest-python; + src = inputs.neotest-python; + }); }; } From 19da90421913a16135e61a69789216fba76f1161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 27 Oct 2023 19:32:39 +0200 Subject: [PATCH 06/11] build: bump inputs --- flake.lock | 331 +++++++++++++---------------------- flake.nix | 2 +- modules/profiles/desktop.nix | 1 - modules/profiles/gaming.nix | 1 - 4 files changed, 122 insertions(+), 213 deletions(-) diff --git a/flake.lock b/flake.lock index 57bc135..475d3d1 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ "arkenfox-userjs": { "flake": false, "locked": { - "lastModified": 1696674829, - "narHash": "sha256-t+BQGAghYqDaTE2UdU2t8/oYmebBJ2DRi2GAva5agFw=", + "lastModified": 1697641173, + "narHash": "sha256-YuGEgJ4bSwvlfSgsUR2s6r1L3ZCdD8pvyU+pY4q+DMk=", "owner": "arkenfox", "repo": "user.js", - "rev": "f54d632da585a08185c6164017d79315c331181f", + "rev": "35e8def0b1e5ecf1198e7efe41cfe6aa0415b320", "type": "github" }, "original": { @@ -81,11 +81,11 @@ ] }, "locked": { - "lastModified": 1696904458, - "narHash": "sha256-3L4I98OkSY0ayGu+p/sO1g1mC6jp2olv1kQVDVNARvE=", + "lastModified": 1696985954, + "narHash": "sha256-dU1lYBWHqxkvbJV3B9oPeqLL0H8FkSKEqjPie+9xPgQ=", "owner": "jcdickinson", "repo": "codeium.nvim", - "rev": "d9b026071378c18b7536be298365a2e3885cd64f", + "rev": "822e762567a0bf50b1a4e733c8c93691934d7606", "type": "github" }, "original": { @@ -140,11 +140,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1696814493, - "narHash": "sha256-1qArVsJGG2RHbV2iKFpAmM5os3myvwpXMOdFy5nh54M=", + "lastModified": 1698155728, + "narHash": "sha256-PUJ40o/0LyMEgSBEfLVyPA0K3gQnPYQDq9dW9nCOU9M=", "owner": "nix-community", "repo": "disko", - "rev": "32ce057c183506cecb0b84950e4eaf39f37e8c75", + "rev": "8c5d52db5690c72406b0cb13a5ac8554a287c93a", "type": "github" }, "original": { @@ -242,14 +242,18 @@ }, "flake-parts_3": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "hercules-ci-effects", + "nixpkgs" + ] }, "locked": { - "lastModified": 1688466019, - "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", + "lastModified": 1696343447, + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", "type": "github" }, "original": { @@ -257,29 +261,6 @@ "type": "indirect" } }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": [ - "neovim-nightly-overlay", - "hercules-ci-effects", - "hercules-ci-agent", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688466019, - "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -355,56 +336,20 @@ "type": "github" } }, - "haskell-flake": { - "locked": { - "lastModified": 1684780604, - "narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=", - "owner": "srid", - "repo": "haskell-flake", - "rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2", - "type": "github" - }, - "original": { - "owner": "srid", - "ref": "0.3.0", - "repo": "haskell-flake", - "type": "github" - } - }, - "hercules-ci-agent": { - "inputs": { - "flake-parts": "flake-parts_4", - "haskell-flake": "haskell-flake", - "nixpkgs": "nixpkgs_6" - }, - "locked": { - "lastModified": 1688568579, - "narHash": "sha256-ON0M56wtY/TIIGPkXDlJboAmuYwc73Hi8X9iJGtxOhM=", - "owner": "hercules-ci", - "repo": "hercules-ci-agent", - "rev": "367dd8cd649b57009a6502e878005a1e54ad78c5", - "type": "github" - }, - "original": { - "id": "hercules-ci-agent", - "type": "indirect" - } - }, "hercules-ci-effects": { "inputs": { "flake-parts": "flake-parts_3", - "hercules-ci-agent": "hercules-ci-agent", "nixpkgs": [ "neovim-nightly-overlay", "nixpkgs" ] }, "locked": { - "lastModified": 1695684520, - "narHash": "sha256-yORqGB0i1OtEf9MOCCT2BIbOd8txPZn216CM+ylMmhY=", + "lastModified": 1698165573, + "narHash": "sha256-cnMTgCDnZiQKsf+wVzigpexskqRCFTKgS58Wx2rNU1c=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "91fae5824f5f1199f61693c6590b4a89abaed9d7", + "rev": "300e0af24a1bbe32d115beb182efb01785582c45", "type": "github" }, "original": { @@ -457,11 +402,11 @@ ] }, "locked": { - "lastModified": 1696776279, - "narHash": "sha256-PRJiq+DSq5o/Dzd7ZYWTA8larDg4btkTICPzfjjalig=", + "lastModified": 1698250431, + "narHash": "sha256-qs2gTeH4wpnWPO6Oi6sOhp2IhG0i0DzcnrJxIY3/CP8=", "owner": "nix-community", "repo": "home-manager", - "rev": "6dfbdc977e059f30376e23f70f67d9726d5c91b8", + "rev": "09587fbbc6a669f7725613e044c2577dc5d43ab5", "type": "github" }, "original": { @@ -475,11 +420,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1696339530, - "narHash": "sha256-rb954Rc+IyUiiXoIuQOJRp0//zH/WeMYZ3yJ5CccODA=", + "lastModified": 1698136694, + "narHash": "sha256-YKtA8un/BMJY17r9ydLa08y2St7Dtai2y/67t1+UGeM=", "owner": "hyprwm", "repo": "contrib", - "rev": "2e3f8ac2a3f1334fd2e211b07ed76b4215bb0542", + "rev": "5fd96ad55f4695837e938a8da0a83babcb64371f", "type": "github" }, "original": { @@ -497,11 +442,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1696891919, - "narHash": "sha256-h7/lmKV5zfJz/4m/oLib7iTqQ7fpfB599AzW2QRoGtg=", + "lastModified": 1698190104, + "narHash": "sha256-40TEEIjlIb0hJE/yRsjLBwjkRYkj/4QRTkN1Op86umw=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "8abb6e1cee3e967ff414af0d6a1a31ebced95f5b", + "rev": "a1b138a6258b00787cea43bddc48b7caa8cca3a0", "type": "github" }, "original": { @@ -540,11 +485,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1696724955, - "narHash": "sha256-7CczVKotC1RJuSyJMxgzUP11Y1txku9JAga5eFxpA+4=", + "lastModified": 1698097178, + "narHash": "sha256-W4W3pAYNpXp0jLZwK0Bxw6R7n2/UYxp+lnT5mD2/xEM=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "72735ae6352085ef842f6ed496889115afd76ce4", + "rev": "d6856adaffb77a9cc1aac3d04d98276eaa5602a4", "type": "github" }, "original": { @@ -555,11 +500,11 @@ }, "impermanence": { "locked": { - "lastModified": 1694622745, - "narHash": "sha256-z397+eDhKx9c2qNafL1xv75lC0Q4nOaFlhaU1TINqb8=", + "lastModified": 1697303681, + "narHash": "sha256-caJ0rXeagaih+xTgRduYtYKL1rZ9ylh06CIrt1w5B4g=", "owner": "nix-community", "repo": "impermanence", - "rev": "e9643d08d0d193a2e074a19d4d90c67a874d932e", + "rev": "0f317c2e9e56550ce12323eb39302d251618f5b5", "type": "github" }, "original": { @@ -586,11 +531,11 @@ }, "master": { "locked": { - "lastModified": 1696931607, - "narHash": "sha256-gVV772uE7Th5iyRTh+KNA4YOBzaL9DjmNz+qep2f/Ww=", + "lastModified": 1698254131, + "narHash": "sha256-wPqfjnqgZIhbLFK9ZDU+mkGJN4o7zWYcgkNdBxfeqZs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c74fd1b820c24ebe1065af1cabbe2b6a4c86641d", + "rev": "4df6cc87b5b7b39e4e0160132ca901fd28a10295", "type": "github" }, "original": { @@ -648,11 +593,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1696892794, - "narHash": "sha256-KQ1X1CLjabnnLItHb2zlrSZzj4lQNkdZMx84QWcU9qA=", + "lastModified": 1698138555, + "narHash": "sha256-HOzLvbRnHtpNQJJN52JYKnTm0d9K508QKsEFLbxjRHk=", "owner": "neovim", "repo": "neovim", - "rev": "43f22853fecf312713deed983b9cde1a6bda6ebd", + "rev": "1094d0c0dbd0f37ccc0f1d18c73c6066e5690664", "type": "github" }, "original": { @@ -668,14 +613,14 @@ "flake-parts": "flake-parts_2", "hercules-ci-effects": "hercules-ci-effects", "neovim-flake": "neovim-flake", - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1696896059, - "narHash": "sha256-GLJJRb2PSI9Hq1J4D0YVMV6lxHPP2QilEAWeIrEQSEI=", + "lastModified": 1698192055, + "narHash": "sha256-YC5IWqMTwdFxrIWYfdhW3SWmb356VtzcXt8fc49PCos=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "4ea129658fe3e7ecaebe574093ed3fe9673b5f6c", + "rev": "d3ea1553487b52fe7603c830994475f51cd619db", "type": "github" }, "original": { @@ -691,11 +636,11 @@ ] }, "locked": { - "lastModified": 1696736548, - "narHash": "sha256-Dg0gJ9xVXud55sAbXspMapFYZOpVAldQQo7MFp91Vb0=", + "lastModified": 1697946153, + "narHash": "sha256-7k7qIwWLaYPgQ4fxmEdew3yCffhK6rM4I4Jo3X/79DA=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "2902dc66f64f733bfb45754e984e958e9fe7faf9", + "rev": "5a2006282caaf32663cdcd582c5b18809c7d7d8d", "type": "github" }, "original": { @@ -706,11 +651,11 @@ }, "nix-lazy-nvim": { "locked": { - "lastModified": 1694868321, - "narHash": "sha256-LHPQkD+7ltdo77gpFQOnr8QAgYPdtFf9pm/Alwrs570=", + "lastModified": 1698421129, + "narHash": "sha256-pwpLc6SS3c4s6i2+MZa8y+JigFwAbFw69bwN8S1CYwQ=", "ref": "refs/heads/main", - "rev": "1dc6361600111b1c46f6e85221334c8c47f88200", - "revCount": 4, + "rev": "408ab5cad386453e3cce8233b377fc95320e4637", + "revCount": 5, "type": "git", "url": "https://git.moritzboeh.me/moritz/NixLazy.nvim" }, @@ -729,17 +674,17 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1685886360, - "narHash": "sha256-mQ6Eryo7CFkt8KHVJcbg0HfXMGFrjMq04XnL9b9TsX0=", + "lastModified": 1697392285, + "narHash": "sha256-1IBnF9IuStUWoAKJ74HNhV46+9Cbf/yZP6h6hJOJ1Cg=", "owner": "privatevoid-net", "repo": "nix-super", - "rev": "518ce777422c6ade8988a3dd1bebb407a08f3851", + "rev": "ba035e1ea339a97e6ba6a1dd79e0c0e334240234", "type": "github" }, "original": { "owner": "privatevoid-net", "repo": "nix-super", - "rev": "518ce777422c6ade8988a3dd1bebb407a08f3851", + "rev": "ba035e1ea339a97e6ba6a1dd79e0c0e334240234", "type": "github" } }, @@ -777,24 +722,6 @@ "type": "github" } }, - "nixpkgs-lib_2": { - "locked": { - "dir": "lib", - "lastModified": 1688049487, - "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -827,29 +754,13 @@ "type": "github" } }, - "nixpkgs_10": { - "locked": { - "lastModified": 1692934111, - "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { - "lastModified": 1696725822, - "narHash": "sha256-B7uAOS7TkLlOg1aX01rQlYbydcyB6ZnLJSfaYbKVww8=", + "lastModified": 1697915759, + "narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5aabb5780a11c500981993d49ee93cfa6df9307b", + "rev": "51d906d2341c9e866e48c2efcaac0f2d70bfd43e", "type": "github" }, "original": { @@ -877,11 +788,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1694767346, - "narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=", + "lastModified": 1697723726, + "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ace5093e36ab1e95cb9463863491bee90d5a4183", + "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", "type": "github" }, "original": { @@ -909,53 +820,37 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1688322751, - "narHash": "sha256-eW62dC5f33oKZL7VWlomttbUnOTHrAbte9yNUNW8rbk=", + "lastModified": 1697915759, + "narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0fbe93c5a7cac99f90b60bdf5f149383daaa615f", + "rev": "51d906d2341c9e866e48c2efcaac0f2d70bfd43e", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_7": { "locked": { - "lastModified": 1696757521, - "narHash": "sha256-cfgtLNCBLFx2qOzRLI6DHfqTdfWI+UbvsKYa3b3fvaA=", - "owner": "NixOS", + "lastModified": 1697915759, + "narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "2646b294a146df2781b1ca49092450e8a32814e1", + "rev": "51d906d2341c9e866e48c2efcaac0f2d70bfd43e", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_8": { - "locked": { - "lastModified": 1696757521, - "narHash": "sha256-cfgtLNCBLFx2qOzRLI6DHfqTdfWI+UbvsKYa3b3fvaA=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2646b294a146df2781b1ca49092450e8a32814e1", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { "locked": { "lastModified": 1689261696, "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", @@ -971,14 +866,30 @@ "type": "github" } }, + "nixpkgs_9": { + "locked": { + "lastModified": 1692934111, + "narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "none-ls-nvim": { "flake": false, "locked": { - "lastModified": 1696658105, - "narHash": "sha256-4+B2F4ZweWTqXlhSs0jiBaKSv52G4X7p37KHfYl6sPo=", + "lastModified": 1697600654, + "narHash": "sha256-dDMZEgT5uG31bEsLiX9r6MJlOJUdQyeTPJAeRcY2z7s=", "owner": "nvimtools", "repo": "none-ls.nvim", - "rev": "ae339f45590cc421a68de885fc5a3261cc247362", + "rev": "dc9b7e28f5573a1a2225ffb33893d23d3e052ed6", "type": "github" }, "original": { @@ -989,11 +900,11 @@ }, "nur": { "locked": { - "lastModified": 1696923989, - "narHash": "sha256-cANE1rSfOb3yxQ+bH7CTXZbj34AnQyzu0g22JDbLUpE=", + "lastModified": 1698253808, + "narHash": "sha256-00mJdl0SYfSO/zQYpOaBV3sSZfQbl8cahI7CewTbEtA=", "owner": "nix-community", "repo": "NUR", - "rev": "0268065df586f8cae6b648432ebbda3b5ac96503", + "rev": "923a29e2916f1d2589d933018b80b9ca2c4e39be", "type": "github" }, "original": { @@ -1005,11 +916,11 @@ "nvim-lspconfig": { "flake": false, "locked": { - "lastModified": 1696572942, - "narHash": "sha256-i3lDsFwoMddpN1I4t3Fj+Dthyxq7twCgpYuNtlvfI5Y=", + "lastModified": 1698055249, + "narHash": "sha256-Ohckvu+Vt5CE5uZt2TJcUmG4QM97d1F67n2YmCaVGwo=", "owner": "neovim", "repo": "nvim-lspconfig", - "rev": "2b361e043810d5587d9af0787f8ce40da92ec5e9", + "rev": "6428fcab6f3c09e934bc016c329806314384a41e", "type": "github" }, "original": { @@ -1021,11 +932,11 @@ "nvim-puppeteer": { "flake": false, "locked": { - "lastModified": 1696887151, - "narHash": "sha256-voQru65IC5OM5JVwa1v62O7tmsIdGZJ6BS75lHt0Pxo=", + "lastModified": 1697557313, + "narHash": "sha256-9aLDtdhyWzU8uqH6mohiLC6eEATC1Neb+rvcx7sxcdU=", "owner": "chrisgrieser", "repo": "nvim-puppeteer", - "rev": "4a2c68b93366eca5bca9e6b71e6cc8d643cfdca5", + "rev": "b2793ab39120086fa59327d3901a847961198662", "type": "github" }, "original": { @@ -1056,15 +967,15 @@ "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_3", "gitignore": "gitignore", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_8", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1696846637, - "narHash": "sha256-0hv4kbXxci2+pxhuXlVgftj/Jq79VSmtAyvfabCCtYk=", + "lastModified": 1698227354, + "narHash": "sha256-Fi5H9jbaQLmLw9qBi/mkR33CoFjNbobo5xWdX4tKz1Q=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "42e1b6095ef80a51f79595d9951eb38e91c4e6ca", + "rev": "bd38df3d508dfcdff52cd243d297f218ed2257bf", "type": "github" }, "original": { @@ -1076,11 +987,11 @@ "rofi-wayland": { "flake": false, "locked": { - "lastModified": 1695649959, - "narHash": "sha256-WG1EyBYTbDsK4RsPgp8K/PlscvRSNthQSyN3cqxuXcc=", + "lastModified": 1697052256, + "narHash": "sha256-3mTmwoeP7yUg7ldbatvQB+hwHhwuHOoZZb1ozWwSsVw=", "owner": "lbonn", "repo": "rofi", - "rev": "9d11a2b4a9095b3f0a092155f749900f7eb8e047", + "rev": "5cd1e3ca2b6b896b2e591b465cc590479ef07aab", "type": "github" }, "original": { @@ -1113,7 +1024,7 @@ "nix-index-database": "nix-index-database", "nix-lazy-nvim": "nix-lazy-nvim", "nix-super": "nix-super", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_7", "none-ls-nvim": "none-ls-nvim", "nur": "nur", "nvim-lspconfig": "nvim-lspconfig", @@ -1145,11 +1056,11 @@ }, "stable": { "locked": { - "lastModified": 1696697597, - "narHash": "sha256-q26Qv4DQ+h6IeozF2o1secyQG0jt2VUT3V0K58jr3pg=", + "lastModified": 1697957990, + "narHash": "sha256-LlyEQ4z1immaiZV+MQMUXM3KpNoRY/xZVm8mmN5j3yg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5a237aecb57296f67276ac9ab296a41c23981f56", + "rev": "b3ddf9649fdac7db15aeea95cb3114c13594d265", "type": "github" }, "original": { @@ -1252,11 +1163,11 @@ "telekasten-nvim": { "flake": false, "locked": { - "lastModified": 1694166243, - "narHash": "sha256-DblFcMlXsiHJCFojjpcwqZdnRqGuk79yoNBJTR8p5S4=", + "lastModified": 1697095424, + "narHash": "sha256-lLy83LiGhyAdVV82YSJUfWyLqxK3ghFJ/FWNxBFl7mQ=", "owner": "renerocksai", "repo": "telekasten.nvim", - "rev": "bd5d323581f24ee124b33688287e6a22244c6f2a", + "rev": "3fd50c62c1ed2f973ce8639c1218445e4e91a962", "type": "github" }, "original": { @@ -1268,7 +1179,7 @@ "timers": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_9", "utils": "utils" }, "locked": { @@ -1307,18 +1218,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1696410538, - "narHash": "sha256-ecDhdYLXWHsxMv+EWG36mCNDvzRbu9qfjH7dLxL7aGM=", + "lastModified": 1697909146, + "narHash": "sha256-jU0I6FoCKnj4zIBL4daosFWh81U1fM719Z6cae8PxSY=", "owner": "wlroots", "repo": "wlroots", - "rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc", + "rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc", + "rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2", "type": "gitlab" } }, @@ -1338,11 +1249,11 @@ ] }, "locked": { - "lastModified": 1694628480, - "narHash": "sha256-Qg9hstRw0pvjGu5hStkr2UX1D73RYcQ9Ns/KnZMIm9w=", + "lastModified": 1697981233, + "narHash": "sha256-y8q4XUwx+gVK7i2eLjfR32lVo7TYvEslyzrmzYEaPZU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "8f45a6435069b9e24ebd3160eda736d7a391cbf2", + "rev": "22e7a65ff9633e1dedfa5317fdffc49f68de2ff2", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d21f71f..384583f 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ # Programs nix-super.inputs.nixpkgs.follows = "stable"; - nix-super.url = "github:privatevoid-net/nix-super/518ce777422c6ade8988a3dd1bebb407a08f3851"; # NOTE: because nix 1.18 is borked + nix-super.url = "github:privatevoid-net/nix-super/ba035e1ea339a97e6ba6a1dd79e0c0e334240234"; rofi-wayland.flake = false; rofi-wayland.url = "github:lbonn/rofi/wayland"; timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git"; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index b6c9e9f..0392422 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -32,7 +32,6 @@ in firefox.enable = mkDefault true; gpg.enable = mkDefault true; hyprland.enable = mkDefault true; - logseq.enable = mkDefault true; nix-edit.enable = mkDefault true; nvim.enable = mkDefault true; python.versions."311".enable = mkDefault true; diff --git a/modules/profiles/gaming.nix b/modules/profiles/gaming.nix index bf493fd..1546724 100644 --- a/modules/profiles/gaming.nix +++ b/modules/profiles/gaming.nix @@ -16,7 +16,6 @@ in environment.systemPackages = with pkgs; [ lutris legendary-gl - heroic mangohud ]; }; From c7e7b39d8353ba83d5d5dcffbd89a67a4fe464dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 27 Oct 2023 19:33:19 +0200 Subject: [PATCH 07/11] feat: make boot quiet --- modules/profiles/desktop.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 0392422..b5d865a 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -124,6 +124,9 @@ in }; # disable network-online.target systemd.services.NetworkManager-wait-online.enable = false; - + boot = { + consoleLogLevel = 0; + kernelParams = [ "quiet" "udev.log_level=3" ]; + }; }; } From 8bc546daf0389b06b4aacb86417059fb47f080e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 28 Oct 2023 15:17:59 +0200 Subject: [PATCH 08/11] feat(nvim): add dap nvim --- modules/programs/nvim/plugins/debugger.nix | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 modules/programs/nvim/plugins/debugger.nix diff --git a/modules/programs/nvim/plugins/debugger.nix b/modules/programs/nvim/plugins/debugger.nix new file mode 100644 index 0000000..4dd93b1 --- /dev/null +++ b/modules/programs/nvim/plugins/debugger.nix @@ -0,0 +1,49 @@ +{ pkgs, lib, ... }: + +with builtins; +{ + config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [ + { + plugin = nvim-dap; + keys = [ + { key = "cb"; cmd = "lua require('dap').toggle_breakpoint()"; desc = "Toggle breakpoint"; } + { key = "cd"; cmd = "lua require('dap').continue()"; 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 + ''; + } + ]; + } + ]; +} From 528098839dd07b1491648fe869b60131826ffd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 28 Oct 2023 15:18:59 +0200 Subject: [PATCH 09/11] refactor(nvim): keybinding mess --- modules/programs/nvim/plugins/coding.nix | 59 +++++++++---------- .../nvim/plugins/lua/null-ls-nvim.lua | 18 ------ .../nvim/plugins/lua/nvim-lspconfig.lua | 5 +- .../nvim/plugins/lua/which-key-nvim.lua | 4 +- 4 files changed, 30 insertions(+), 56 deletions(-) diff --git a/modules/programs/nvim/plugins/coding.nix b/modules/programs/nvim/plugins/coding.nix index 5c5a168..cc3be31 100644 --- a/modules/programs/nvim/plugins/coding.nix +++ b/modules/programs/nvim/plugins/coding.nix @@ -31,13 +31,12 @@ with builtins; } { plugin = trouble-nvim; + cmd = [ "TodoTelescope" ]; keys = [ - { key = "xx"; cmd = "TroubleToggle document_diagnostics"; desc = "Document Diagnostics (Trouble)"; } - { key = "xX"; cmd = "TroubleToggle workspace_diagnostics"; desc = "Workspace Diagnostics (Troule)"; } - { key = "xl"; cmd = "TroubleToggle loclist"; desc = "Location List (Trouble)"; } - { key = "xq"; cmd = "TroubleToggle quickfix"; desc = "Quickfix List (Trouble)"; } - { key = "xt"; cmd = "TodoTrouble"; desc = "Todo (Trouble)"; } - { key = "xT"; cmd = "TodoTrouble keywords=TODO,FIX,FIXME"; desc = "Todo/Fix/Fixme (Trouble)"; } + { key = "cD"; cmd = "TroubleToggle document_diagnostics"; desc = "Document Diagnostics (Trouble)"; } + { key = "cW"; cmd = "TroubleToggle workspace_diagnostics"; desc = "Workspace Diagnostics (Trouble)"; } + { key = "cl"; cmd = "TroubleToggle loclist"; desc = "Location List (Trouble)"; } + { key = "cq"; cmd = "TroubleToggle quickfix"; desc = "Quickfix List (Trouble)"; } { key = "ft"; cmd = "TodoTelescope"; desc = "Todo"; } { key = "[q"; @@ -223,7 +222,7 @@ with builtins; ]; cmd = [ "Telekasten" ]; keys = [ - { key = "z"; cmd = "Telekasten"; desc = "zettelkasten"; } + { key = "fz"; cmd = "Telekasten"; desc = "Zettelkasten"; } ]; conf = builtins.readFile ./lua/zettelkasten-nvim.lua; } @@ -268,26 +267,18 @@ with builtins; { plugin = refactoring-nvim; keys = [ - { key = "re"; cmd = ": Refactor eextract "; desc = "Extract"; mode = [ "x" ]; } - { key = "rf"; cmd = ": Refactor extract_to_file "; desc = "Extract to file"; mode = [ "x" ]; } - { key = "rv"; cmd = ": Refactor extract_var "; desc = "Extract variable"; mode = [ "x" ]; } - { key = "ri"; cmd = ": Refactor inline_var"; desc = "Inline variable"; mode = [ "n" "x" ]; } - { key = "rI"; cmd = ": Refactor inline_func"; desc = "Inline function"; mode = [ "n" "x" ]; } - { key = "rb"; cmd = ": Refactor extract_block"; desc = "Extract block"; mode = [ "n" ]; } - { key = "rbf"; cmd = ": Refactor extract_block_to_file"; desc = "Extract block to file"; mode = [ "n" ]; } + { + key = "cR"; + cmd = "lua require('telescope').extensions.refactoring.refactors()"; + desc = "Refactor"; + mode = [ "x" "n" ]; + } ]; dependencies = [ { plugin = which-key-nvim; } { plugin = plenary-nvim; } { plugin = nvim-lspconfig; } ]; - init = /* lua */ '' - require("which-key").register({ - ["r"] = { - name = "refactoring", - }, - }) - ''; opts = { }; } { @@ -295,12 +286,22 @@ with builtins; keys = [ { key = "ha"; cmd = "lua require('harpoon.mark').add_file()"; desc = "Add file"; } { key = "hh"; cmd = "lua require('harpoon.ui').toggle_quick_menu()"; desc = "Harpoon"; } - { key = "h1"; cmd = "lua require('harpoon.ui').nav_file(1)"; desc = "Harpoon file 1"; } - { key = "h2"; cmd = "lua require('harpoon.ui').nav_file(2)"; desc = "Harpoon file 2"; } - { key = "h3"; cmd = "lua require('harpoon.ui').nav_file(3)"; desc = "Harpoon file 3"; } - { key = "h4"; cmd = "lua require('harpoon.ui').nav_file(4)"; desc = "Harpoon file 4"; } + { key = "1"; cmd = "lua require('harpoon.ui').nav_file(1)"; desc = "Harpoon file 1"; } + { key = "2"; cmd = "lua require('harpoon.ui').nav_file(2)"; desc = "Harpoon file 2"; } + { key = "3"; cmd = "lua require('harpoon.ui').nav_file(3)"; desc = "Harpoon file 3"; } + { key = "4"; cmd = "lua require('harpoon.ui').nav_file(4)"; desc = "Harpoon file 4"; } ]; opts = { }; + init = /* lua */ '' + require("which-key").register({ + ["h"] = { + name = "harpoon", + }, + }) + ''; + dependencies = [ + { plugin = which-key-nvim; } + ]; } { plugin = nvim-puppeteer; @@ -308,7 +309,6 @@ with builtins; } { plugin = neotest; - lazy = false; keys = [ { key = "ct"; cmd = "lua require('neotest').summary.toggle()"; 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; } diff --git a/modules/programs/nvim/plugins/lua/null-ls-nvim.lua b/modules/programs/nvim/plugins/lua/null-ls-nvim.lua index 32a1f7e..3d40357 100644 --- a/modules/programs/nvim/plugins/lua/null-ls-nvim.lua +++ b/modules/programs/nvim/plugins/lua/null-ls-nvim.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 = "t" }) diff --git a/modules/programs/nvim/plugins/lua/nvim-lspconfig.lua b/modules/programs/nvim/plugins/lua/nvim-lspconfig.lua index 44d969d..99decf0 100644 --- a/modules/programs/nvim/plugins/lua/nvim-lspconfig.lua +++ b/modules/programs/nvim/plugins/lua/nvim-lspconfig.lua @@ -32,9 +32,8 @@ local on_attach_def = function(client, bufnr) "Hover", }, [""] = { - 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() diff --git a/modules/programs/nvim/plugins/lua/which-key-nvim.lua b/modules/programs/nvim/plugins/lua/which-key-nvim.lua index aa3c8a9..a6e6a8b 100644 --- a/modules/programs/nvim/plugins/lua/which-key-nvim.lua +++ b/modules/programs/nvim/plugins/lua/which-key-nvim.lua @@ -35,11 +35,9 @@ require("which-key").register({ [""] = { 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" }, From 4cb84570751319abba99fca3e23d6d0f63bfe22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 28 Oct 2023 15:19:29 +0200 Subject: [PATCH 10/11] feat(flake): shorter devshell commands --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 384583f..cdfbc90 100644 --- a/flake.nix +++ b/flake.nix @@ -120,7 +120,7 @@ ''; } { - name = "nixos-build"; + name = "build"; help = "use nom to build system"; command = '' @@ -128,17 +128,17 @@ ''; } { - name = "nixos-switch"; + name = "apply"; help = "wrapper for nixos-rebuild switch"; command = "sudo nixos-rebuild switch --flake . $@"; } { - name = "nixos-test"; + name = "test"; help = "wrapper for nixos-rebuild switch"; command = "sudo nixos-rebuild test --flake . $@"; } { - name = "nixos-boot"; + name = "boot"; help = "wrapper for nixos-rebuild switch"; command = "sudo nixos-rebuild boot --flake . $@"; } From 9c70942dfb26d3a9fb548eea3a50d0e4ad9888f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 28 Oct 2023 15:19:53 +0200 Subject: [PATCH 11/11] fix(nvim): gitsigns in status column --- modules/programs/nvim/plugins/lua/statuscol-nvim.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/nvim/plugins/lua/statuscol-nvim.lua b/modules/programs/nvim/plugins/lua/statuscol-nvim.lua index b1e1eb1..f3d2c67 100644 --- a/modules/programs/nvim/plugins/lua/statuscol-nvim.lua +++ b/modules/programs/nvim/plugins/lua/statuscol-nvim.lua @@ -11,7 +11,7 @@ require("statuscol").setup({ click = "v:lua.ScLa", }, { - sign = { name = { "GitSigns" }, auto = true }, + sign = { namespace = { "gitsigns*" }, auto = true }, click = "v:lua.ScSa", }, {