From 8c1552cdde8c9e369f0ef1aaa2a70638df46dbdc Mon Sep 17 00:00:00 2001 From: th3r00t Date: Wed, 17 Sep 2025 11:31:58 -0400 Subject: [PATCH] Adding nixvim --- flake.lock | 144 +++++++++++++++++ flake.nix | 37 +++-- home/.emacs.org.~undo-tree~ | 39 +++++ home/common.nix | 153 ++++++++++-------- home/emacs.org | 125 +++++--------- .../configurations/configuration-xps13.nix | 122 +++++++------- modules/nixvim/nixvim.nix | 46 ++++++ modules/nixvim/which-key.nix | 45 ++++++ 8 files changed, 484 insertions(+), 227 deletions(-) create mode 100644 home/.emacs.org.~undo-tree~ create mode 100644 modules/nixvim/nixvim.nix create mode 100644 modules/nixvim/which-key.nix diff --git a/flake.lock b/flake.lock index 6747cfa..bcc7038 100644 --- a/flake.lock +++ b/flake.lock @@ -141,6 +141,45 @@ "type": "indirect" } }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "4524271976b625a4a605beefd893f270620fd751", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "git-hooks": { "inputs": { "flake-compat": "flake-compat_3", @@ -539,6 +578,34 @@ "type": "github" } }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754860581, + "narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.1.1", + "repo": "ixx", + "type": "github" + } + }, "neovim-config": { "flake": false, "locked": { @@ -696,6 +763,52 @@ "type": "github" } }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts_3", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch", + "systems": "systems_3" + }, + "locked": { + "lastModified": 1758061611, + "narHash": "sha256-WJJDjNu80dWMSlpexhgRybPsvwl8C2tPwT6yM918Tsg=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "7f45eae65baa38d77d09e0fcf5bfeab6c0f733c0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1757885130, + "narHash": "sha256-56CMb5W/pgjKLh0bx2ekhn5rde/YmgR63HAqrY9/BCw=", + "owner": "NuschtOS", + "repo": "search", + "rev": "fae3c59a646e00c4b1d359c50b27458a0713d2fd", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", @@ -730,6 +843,7 @@ "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_4", + "nixvim": "nixvim", "sops-nix": "sops-nix" } }, @@ -768,6 +882,36 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 36f1bdf..d1406ec 100644 --- a/flake.nix +++ b/flake.nix @@ -22,13 +22,16 @@ neovim-config = { url = "git+https://git.th3r00t.net/th3r00t/nvim-config.git?ref=New-Master"; # url = "git+ssh://git@git.th3r00t.net/th3r00t/nvim-config.git?ref=main"; - flake = false; }; + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, home-manager, nix-index-database, sops-nix, disko, - nixos-hardware, ... + nixos-hardware, nixvim, ... }@inputs: let overlays = [ @@ -64,11 +67,11 @@ ./home/xps13.nix nix-index-database.homeModules.nix-index ]; - home.file.".config/nvim" = { - source = inputs.neovim-config; - recursive = true; - # executable = true; - }; + # home.file.".config/nvim" = { + # source = inputs.neovim-config; + # recursive = true; + # # executable = true; + # }; }; } ]; @@ -92,11 +95,11 @@ ./home/server.nix nix-index-database.homeModules.nix-index ]; - home.file.".config/nvim" = { - source = inputs.neovim-config; - recursive = true; - # executable = true; - }; + # home.file.".config/nvim" = { + # source = inputs.neovim-config; + # recursive = true; + # # executable = true; + # }; }; # home-manager.users.th3r00t = import ./home.nix; } @@ -121,11 +124,11 @@ ./home/server.nix nix-index-database.homeModules.nix-index ]; - home.file.".config/nvim" = { - source = inputs.neovim-config; - recursive = true; - # executable = true; - }; + # home.file.".config/nvim" = { + # source = inputs.neovim-config; + # recursive = true; + # # executable = true; + # }; }; # home-manager.users.th3r00t = import ./home.nix; } diff --git a/home/.emacs.org.~undo-tree~ b/home/.emacs.org.~undo-tree~ new file mode 100644 index 0000000..c82b3cc --- /dev/null +++ b/home/.emacs.org.~undo-tree~ @@ -0,0 +1,39 @@ +(undo-tree-save-format-version . 1) +"b0433e5b4f63091c08f49d36950524df12fe72d9" +[nil nil nil nil (26825 51228 314037 976000) 0 nil] +([nil nil ((#("-" 0 1 (face (org-block) font-lock-multiline t src-block t font-lock-fontified t fontified t)) . 2733) (undo-tree-id2 . -1) (undo-tree-id3 . -1) (t 26825 50506 267157 891000)) nil (26825 51228 314035 952000) 0 nil]) +([nil nil ((#("-" 0 1 (face (org-block) font-lock-multiline t src-block t font-lock-fontified t fontified t)) . 2753) (undo-tree-id0 . -1) (undo-tree-id1 . -1)) nil (26825 51228 314028 471000) 0 nil]) +([nil nil ((3573 . 3582) (3571 . 3573) (3568 . 3571) (3562 . 3568) (3541 . 3562) (3539 . 3541) (3537 . 3539) (3536 . 3537) (3532 . 3536) (#("a" 0 1 (face org-level-3 fontified t)) . -3532) (undo-tree-id28 . -1) (#("s" 0 1 (face org-level-3 fontified t)) . -3533) (undo-tree-id29 . -1) 3534 (3527 . 3534) (3526 . 3527) (t 26825 51228 315517 163000)) nil (26825 52227 74321 306000) 0 nil]) +([nil nil ((3649 . 3653) (3628 . 3649) (3615 . 3628) (3614 . 3615) (3606 . 3614) (3593 . 3606) (3572 . 3593)) nil (26825 52227 74285 505000) 0 nil]) +([nil nil ((nil rear-nonsticky nil 3653 . 3654) (#(" +" 0 1 (fontified nil font-lock-fontified t)) . -3692) (3653 . 3693) 3652) nil (26825 52227 74280 160000) 0 nil]) +([nil nil ((3673 . 3675) (3665 . 3673) (#("p" 0 1 (fontified t font-lock-fontified t)) . -3665) (undo-tree-id25 . -1) 3666 (3664 . 3666) (#("'js" 0 3 (fontified t font-lock-fontified t)) . 3664) (undo-tree-id26 . -2) (undo-tree-id27 . -2) 3666) nil (26825 52227 74277 601000) 0 nil]) +([nil nil ((nil rear-nonsticky nil 3700 . 3701) (#(" +" 0 1 (fontified nil font-lock-fontified t)) . -3747) (3700 . 3748) 3674) nil (26825 52227 74272 768000) 0 nil]) +([nil nil ((3711 . 3716) (#("'typescript" 0 11 (fontified t font-lock-fontified t)) . 3711) (undo-tree-id23 . -10) (undo-tree-id24 . -4) 3715) nil (26825 52227 74271 184000) 0 nil]) +([nil nil ((#("(add-hook 'python-mode-hook 'eglot-ensure) +(add-hook 'js-mode-hook 'eglot-ensure) +(add-hook 'typescript-mode-hook 'eglot-ensure) +(add-hook 'rust-mode-hook 'eglot-ensure) +" 0 43 (font-lock-fontified t fontified t) 43 81 (font-lock-fontified t fontified t) 81 82 (rear-nonsticky t fontified t) 82 128 (fontified t font-lock-fontified t) 128 129 (rear-nonsticky t fontified t) 129 169 (fontified t font-lock-fontified t) 169 170 (font-lock-fontified t fontified t)) . 3572) (undo-tree-id17 . -143) (undo-tree-id18 . -169) (undo-tree-id19 . -14) (undo-tree-id20 . -143) (undo-tree-id21 . 26) (undo-tree-id22 . -143) 3715) nil (26825 52227 74256 400000) 0 nil]) +([nil nil ((3818 . 3822) (3808 . 3818) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3808) (undo-tree-id11 . -1) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3809) (undo-tree-id12 . -1) 3810 (3803 . 3810) (3802 . 3803) (3782 . 3802) (3761 . 3782) (3757 . 3761) (3750 . 3757) (3733 . 3750) (3726 . 3733) (3719 . 3726) (3708 . 3719) (3701 . 3708) (3687 . 3701) (3686 . 3687) (3679 . 3686) (3658 . 3679) (3653 . 3658) (3652 . 3653) (3648 . 3652) (#(" " 0 1 (face (org-code) font-lock-fontified t fontified t)) . -3648) (undo-tree-id13 . -1) 3649 (3647 . 3649) (3642 . 3647) (3623 . 3642) (3610 . 3623) (3605 . 3610) (3604 . 3605) (3600 . 3604) (#("i" 0 1 (font-lock-fontified t fontified t)) . -3600) (undo-tree-id14 . -1) 3601 (3598 . 3601) (3595 . 3598) (3574 . 3595) (3572 . 3574) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3572) (undo-tree-id15 . -1) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3573) (undo-tree-id16 . -1) 3574 (3572 . 3574) (3571 . 3572)) nil (26825 52227 74246 261000) 0 nil]) +([nil nil ((#(" " 0 1 (font-lock-fontified t fontified t)) . -3853) (undo-tree-id4 . -1) (undo-tree-id5 . -1) (undo-tree-id6 . -1) (undo-tree-id7 . -1) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3854) (undo-tree-id8 . -1) (undo-tree-id9 . -1) (undo-tree-id10 . -1) 3855 (3848 . 3855) (3835 . 3848) (3832 . 3835) (3825 . 3832) (3809 . 3825) (3802 . 3809)) nil (26825 52227 74226 305000) 0 nil]) +([nil nil ((#("list) + " 0 6 (font-lock-fontified t fontified t) 6 9 (font-lock-fontified t fontified t)) . -3977) (undo-tree-id148 . -9) (undo-tree-id149 . -8) (undo-tree-id150 . -9) (undo-tree-id151 . -9) 3986 (3985 . 3986) (3982 . 3985) (3976 . 3982) (3965 . 3976) (#("p" 0 1 (font-lock-fontified t fontified t)) . -3965) (undo-tree-id152 . -1) 3966 (3946 . 3966) (3942 . 3946) (3921 . 3942) (3918 . 3921) (3913 . 3918) (3905 . 3913) (3884 . 3905) (#("a" 0 1 (font-lock-fontified t fontified t)) . -3884) (undo-tree-id153 . -1) (#("k" 0 1 (font-lock-fontified t fontified t)) . -3885) (undo-tree-id154 . -1) 3886 (3876 . 3886) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3876) (undo-tree-id155 . -1) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3877) (undo-tree-id156 . -1) 3878 (3873 . 3878) (t 26825 52227 76248 974000)) nil (26825 52793 159385 536000) 0 nil]) +([nil nil ((#(" + " 0 1 (font-lock-fontified t fontified t) 1 3 (font-lock-fontified t fontified nil) 3 4 (font-lock-fontified t fontified nil) 4 5 (font-lock-fontified t fontified nil)) . 3873) (undo-tree-id63 . -3) (undo-tree-id64 . -5) (undo-tree-id65 . -3) (undo-tree-id66 . -3) (undo-tree-id67 . -3) (undo-tree-id68 . -3) (undo-tree-id69 . -3) (undo-tree-id70 . -3) (3876 . 3878) (#("(use-pacak" 0 8 (font-lock-fontified t fontified nil) 8 9 (font-lock-fontified t fontified nil) 9 10 (font-lock-fontified t fontified nil)) . 3876) (undo-tree-id71 . -8) (undo-tree-id72 . -10) (undo-tree-id73 . -8) (undo-tree-id74 . -8) (undo-tree-id75 . -8) (undo-tree-id76 . -8) (undo-tree-id77 . -8) (undo-tree-id78 . -8) (3884 . 3886) (#("kage lsp-ui :commands" 0 21 (font-lock-fontified t fontified nil)) . 3884) (undo-tree-id79 . -21) (undo-tree-id80 . -21) (undo-tree-id81 . -21) (undo-tree-id82 . -21) (undo-tree-id83 . -21) (undo-tree-id84 . -21) (undo-tree-id85 . -21) (undo-tree-id86 . -21) (#(" lsp-ui-" 0 8 (font-lock-fontified t fontified nil)) . 3905) (undo-tree-id87 . -8) (undo-tree-id88 . -8) (undo-tree-id89 . -8) (undo-tree-id90 . -8) (undo-tree-id91 . -8) (undo-tree-id92 . -8) (undo-tree-id93 . -8) (undo-tree-id94 . -8) (#("mode)" 0 5 (font-lock-fontified t fontified nil)) . 3913) (undo-tree-id95 . -5) (undo-tree-id96 . -5) (undo-tree-id97 . -5) (undo-tree-id98 . -5) (undo-tree-id99 . -5) (undo-tree-id100 . -5) (undo-tree-id101 . -5) (undo-tree-id102 . -5) (#(" + " 0 1 (font-lock-fontified t fontified t) 1 3 (font-lock-fontified t fontified nil)) . 3918) (undo-tree-id103 . -3) (undo-tree-id104 . -3) (undo-tree-id105 . -3) (undo-tree-id106 . -3) (undo-tree-id107 . -3) (undo-tree-id108 . -3) (undo-tree-id109 . -3) (undo-tree-id110 . -3) (#("(use-package lsp-tree" 0 21 (font-lock-fontified t fontified nil)) . 3921) (undo-tree-id111 . -21) (undo-tree-id112 . -21) (undo-tree-id113 . -21) (undo-tree-id114 . -21) (undo-tree-id115 . -21) (undo-tree-id116 . -21) (undo-tree-id117 . -21) (undo-tree-id118 . -21) (#("macs" 0 4 (font-lock-fontified t fontified nil)) . 3942) (undo-tree-id119 . -4) (undo-tree-id120 . -4) (undo-tree-id121 . -4) (undo-tree-id122 . -4) (undo-tree-id123 . -4) (undo-tree-id124 . -4) (undo-tree-id125 . -4) (undo-tree-id126 . -4) (#(" :commands lsp-treep" 0 19 (font-lock-fontified t fontified nil) 19 20 (font-lock-fontified t fontified nil)) . 3946) (undo-tree-id127 . -19) (undo-tree-id128 . -20) (undo-tree-id129 . -19) (undo-tree-id130 . -19) (undo-tree-id131 . -19) (undo-tree-id132 . -19) (undo-tree-id133 . -19) (undo-tree-id134 . -19) (3965 . 3966) (#("macs-errors" 0 11 (font-lock-fontified t fontified nil)) . 3965) (undo-tree-id135 . -11) (undo-tree-id136 . -11) (undo-tree-id137 . -11) (undo-tree-id138 . -11) (undo-tree-id139 . -11) (undo-tree-id140 . -11) (undo-tree-id141 . -11) (undo-tree-id142 . -11) (#("-list)" 0 1 (font-lock-fontified t fontified nil) 1 6 (font-lock-fontified t fontified nil)) . 3976) (undo-tree-id143 . -6) (undo-tree-id144 . -6) (#(" + " 0 1 (font-lock-fontified t fontified nil) 1 3 (font-lock-fontified t fontified nil)) . 3982) (undo-tree-id145 . -3) (undo-tree-id146 . -3) (#("" 0 1 (font-lock-fontified t fontified nil)) . 3985) (undo-tree-id147 . -1) (3977 . 3986)) nil (26825 52793 159368 649000) 0 nil]) +([nil nil ((nil rear-nonsticky nil 3887 . 3888) (nil fontified nil 3885 . 3888) (nil fontified nil 3879 . 3885) (3879 . 3888) (3875 . 3879) (#(" " 0 4 (font-lock-fontified t fontified nil)) . 3874) (undo-tree-id62 . -4) (3873 . 3879) (t 26825 52227 76248 974000)) nil (26825 52793 159272 311000) 0 nil]) +([nil nil ((#(" + +" 0 1 (font-lock-fontified t fontified t) 1 5 (font-lock-fontified t fontified nil) 5 6 (font-lock-fontified t fontified nil)) . 3873) (undo-tree-id51 . -6) (undo-tree-id52 . -6) (undo-tree-id53 . -6) (undo-tree-id54 . -6) (3874 . 3878) (#(" " 0 4 (font-lock-fontified t fontified nil)) . 3875) (undo-tree-id55 . -4) (undo-tree-id56 . -4) (undo-tree-id57 . -4) (undo-tree-id58 . -4) (#("list) + " 0 6 (fontified nil font-lock-fontified t) 6 8 (fontified nil font-lock-fontified t) 8 9 (rear-nonsticky nil fontified nil font-lock-fontified t)) . 3879) (undo-tree-id59 . -8) (undo-tree-id60 . -8) (undo-tree-id61 . -8) (nil fontified t 3879 . 3885) (nil rear-nonsticky t 3887 . 3888)) nil (26825 52793 159255 865000) 0 nil]) +([nil nil ((4616 . 4619) (4609 . 4616) (4588 . 4609) (4578 . 4588) (#("r" 0 1 (font-lock-multiline t htmlize-link (:uri "https://github.com/tree-sitter/tree-sitter-r") help-echo "LINK: https://github.com/tree-sitter/tree-sitter-r" keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight face org-link rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) font-lock-fontified t fontified t)) . -4578) (undo-tree-id33 . -1) 4579 (4574 . 4579) (4570 . 4574) (#("s" 0 1 (font-lock-multiline t htmlize-link (:uri "https://github.com/tree-sitter/trees") help-echo "LINK: https://github.com/tree-sitter/trees" keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight face org-link rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) font-lock-fontified t fontified t)) . -4570) (undo-tree-id34 . -1) 4571 (4554 . 4571) (4533 . 4554) (4519 . 4533) (4512 . 4519) (4493 . 4512) (4473 . 4493) (4452 . 4473) (4445 . 4452) (4434 . 4445) (4413 . 4434) (4402 . 4413) (4381 . 4402) (4374 . 4381) (4370 . 4374) (4349 . 4370) (4344 . 4349) (4323 . 4344) (4319 . 4323) (#("." 0 1 (font-lock-fontified t fontified t)) . -4319) (undo-tree-id35 . -1) (#(" " 0 1 (font-lock-fontified t fontified t)) . -4320) (undo-tree-id36 . -1) 4321 (4314 . 4321) (4307 . 4314) (4294 . 4307) (4292 . 4294) (4271 . 4292) (4250 . 4271) (4235 . 4250) (4228 . 4235) (4220 . 4228) (4216 . 4220) (#("i" 0 1 (font-lock-multiline t keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight face org-link htmlize-link (:uri "https://github.com/tree-sitter/tree-sii") help-echo "LINK: https://github.com/tree-sitter/tree-sii" rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) font-lock-fontified t fontified t)) . -4216) (undo-tree-id37 . -1) (#("t" 0 1 (font-lock-multiline t htmlize-link (:uri "https://github.com/tree-sitter/tree-siit") help-echo "LINK: https://github.com/tree-sitter/tree-siit" keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight face org-link rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) font-lock-fontified t fontified t)) . -4217) (undo-tree-id38 . -1) 4218 (4213 . 4218) (#("0" 0 1 (font-lock-multiline t htmlize-link (:uri "https://github.com/tree-sitter/tree0") help-echo "LINK: https://github.com/tree-sitter/tree0" keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight face org-link rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) font-lock-fontified t fontified t)) . -4213) (undo-tree-id39 . -1) 4214 (4205 . 4214) (4184 . 4205) (4168 . 4184) (4161 . 4168) (4156 . 4161) (4148 . 4156) (#("0" 0 1 (font-lock-multiline t keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight face org-link htmlize-link (:uri "https://github.com/tree-sitter/tree0") help-echo "LINK: https://github.com/tree-sitter/tree0" rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) font-lock-fontified t fontified t)) . -4148) (undo-tree-id40 . -1) (#("s" 0 1 (font-lock-multiline t keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight face org-link htmlize-link (:uri "https://github.com/tree-sitter/tree0s") help-echo "LINK: https://github.com/tree-sitter/tree0s" rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) font-lock-fontified t fontified t)) . -4149) (undo-tree-id41 . -1) (#("i" 0 1 (font-lock-multiline t htmlize-link (:uri "https://github.com/tree-sitter/tree0si") help-echo "LINK: https://github.com/tree-sitter/tree0si" keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight face org-link rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) font-lock-fontified t fontified t)) . -4150) (undo-tree-id42 . -1) 4151 (4136 . 4151) (4115 . 4136) (4105 . 4115) (4098 . 4105) (4096 . 4098) (4048 . 4049) (#(")" 0 1 (font-lock-fontified t fontified t)) . -4095) (undo-tree-id43 . -1) (#(")" 0 1 (font-lock-fontified t fontified t)) . -4096) (undo-tree-id44 . -1) 4097 (4096 . 4097) (4076 . 4096) (4056 . 4076) (#("h" 0 1 (font-lock-multiline t htmlize-link (:uri "https://h") help-echo "LINK: https://h" keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight face org-link rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) font-lock-fontified t fontified t)) . -4056) (undo-tree-id45 . -1) 4057 (4049 . 4057) (4040 . 4049) (4033 . 4040) (4030 . 4033) (4015 . 4030) (3994 . 4015) (3977 . 3994) (3972 . 3977) (3964 . 3972) (3954 . 3964) (3933 . 3954) (3931 . 3933) (3910 . 3931) (3908 . 3910) (3905 . 3908) (3904 . 3905) (3883 . 3904) (3877 . 3883) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3877) (undo-tree-id46 . -1) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3878) (undo-tree-id47 . -1) 3879 (3875 . 3879) (#(" " 0 2 (font-lock-fontified t fontified nil)) . 3874) (undo-tree-id48 . -2) (3876 . 3877) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3876) (undo-tree-id49 . -1) (#(" " 0 1 (font-lock-fontified t fontified t)) . -3877) (undo-tree-id50 . -1) 3878 (3873 . 3878) (t 26825 52227 76248 974000)) nil (26825 52793 159237 250000) 0 nil]) +([nil nil ((4777 . 4781) (4759 . 4777) (4738 . 4759) (4731 . 4738) (4724 . 4731) (4722 . 4724) (4701 . 4722) (4694 . 4701) (4673 . 4694) (4668 . 4673) (4657 . 4668) (#("r" 0 1 (font-lock-fontified t fontified t)) . -4657) (undo-tree-id30 . -1) 4658 (4651 . 4658) (4645 . 4651) (4624 . 4645) (#(" " 0 1 (font-lock-fontified t fontified t)) . -4624) (undo-tree-id31 . -1) (#(" " 0 1 (font-lock-fontified t fontified t)) . -4625) (undo-tree-id32 . -1) 4626 (4619 . 4626)) nil (26825 52793 159197 331000) 0 nil]) +([nil nil ((3570 . 3571) (#("t" 0 1 (face org-meta-line font-lock-fontified t fontified t)) . -3570) (undo-tree-id0 . -1) 3571 (t 26825 52793 160843 330000)) nil (26825 53665 241879 717000) 0 nil]) +([nil nil ((3544 . 3545) (#("-" 0 1 (face org-meta-line font-lock-fontified t fontified t)) . 3544)) nil (26825 53665 241851 586000) 0 nil]) +([nil nil ((4787 . 4788) (#("-" 0 1 (src-block t face (org-block) font-lock-multiline t font-lock-fontified t fontified t)) . 4787)) nil (26825 53665 241845 50000) 0 nil]) +([nil nil ((3660 . 3661) (#("{" 0 1 (face (org-block) font-lock-multiline t src-block t font-lock-fontified t fontified t)) . 3660) (undo-tree-id1 . -1) (t 26825 53665 244240 518000)) nil (26825 53741 70170 198000) 0 nil]) +([nil current ((3899 . 3906) (t 26825 53741 71926 392000)) nil (26825 54146 156443 524000) 0 nil]) +nil diff --git a/home/common.nix b/home/common.nix index ef1c51b..c25474a 100644 --- a/home/common.nix +++ b/home/common.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, inputs, ... }: { home.file.".local/usr/bin" = { @@ -27,7 +27,10 @@ ../modules/shells.nix ../modules/tmux.nix ../modules/ranger.nix + inputs.nixvim.homeModules.nixvim + ../modules/nixvim/nixvim.nix ]; + home.packages = with pkgs; [ autossh elinks @@ -85,7 +88,7 @@ ) ) pyenv - neovim + # neovim provided by nixvim zig syncthing lazygit @@ -103,78 +106,86 @@ httpie ]; - programs.neovim.plugins = [ - pkgs.vimPlugins.nvim-treesitter.withAllGrammars - pkgs.VimPlugins.coc-nvim - ]; - programs.taskwarrior = { - enable = true; + programs = { + + neovim.plugins = [ + pkgs.vimPlugins.nvim-treesitter.withAllGrammars + pkgs.VimPlugins.coc-nvim + ]; + + taskwarrior = { + enable = true; + }; + + + fzf = { + enable = true; + tmux.enableShellIntegration = true; + enableZshIntegration = true; + colors = { + fg = "#d0d0d0"; + bg = "#24283b"; + hl = "#5f87af"; + "fg+" = "#d0d0d0"; + "bg+" = "#414868"; + "hl+" = "#5fd7ff"; + info = "#afaf87"; + prompt = "#d7005f"; + pointer = "#af5fff"; + marker = "#87ff00"; + spinner = "#af5fff"; + header = "#87afaf"; + }; + }; + + git = { + enable = true; + userName = "th3r00t"; + userEmail = "tty303@proton.me"; + extraConfig = { + commit.gpgSign = true; + gpg.format = "ssh"; + gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers"; + user.signingkey = "~/.ssh/id_ed25519.pub"; + }; + }; + + direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; + + eza = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + }; + ssh = { + enable = true; + extraConfig = '' + Host * + ServerAliveInterval 30 + ServerAliveCountMax 3 + AddKeysToAgent yes + ''; + matchBlocks = { + samphone = { + host = "10.0.0.153"; + user = "u0_a771"; + port = 8022; + identityFile = "~/.ssh/id_ed25519"; + }; + git = { + host = "10.0.0.125"; + user = "git"; + identityFile = "~/.ssh/id_ed25519"; + }; + }; + }; }; services.syncthing = { enable = true; guiAddress = "0.0.0.0:8384"; }; - programs.fzf = { - enable = true; - tmux.enableShellIntegration = true; - enableZshIntegration = true; - colors = { - fg = "#d0d0d0"; - bg = "#24283b"; - hl = "#5f87af"; - "fg+" = "#d0d0d0"; - "bg+" = "#414868"; - "hl+" = "#5fd7ff"; - info = "#afaf87"; - prompt = "#d7005f"; - pointer = "#af5fff"; - marker = "#87ff00"; - spinner = "#af5fff"; - header = "#87afaf"; - }; - }; - programs.git = { - enable = true; - userName = "th3r00t"; - userEmail = "tty303@proton.me"; - extraConfig = { - commit.gpgSign = true; - gpg.format = "ssh"; - gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers"; - user.signingkey = "~/.ssh/id_ed25519.pub"; - }; - }; - programs.direnv = { - enable = true; - enableZshIntegration = true; - nix-direnv.enable = true; - }; - - programs.eza = { - enable = true; - enableBashIntegration = true; - enableZshIntegration = true; - }; - programs.ssh = { - enable = true; - extraConfig = '' - Host * - ServerAliveInterval 30 - ServerAliveCountMax 3 - AddKeysToAgent yes - ''; - matchBlocks = { - samphone = { - host = "10.0.0.153"; - user = "u0_a771"; - port = 8022; - identityFile = "~/.ssh/id_ed25519"; - }; - git = { - host = "10.0.0.125"; - user = "git"; - identityFile = "~/.ssh/id_ed25519"; - }; - }; - }; } diff --git a/home/emacs.org b/home/emacs.org index 99b6ecb..3819f23 100644 --- a/home/emacs.org +++ b/home/emacs.org @@ -1,27 +1,18 @@ * Emacs litterate config file I am using straight as the backend for use package and have thusly set it in [./early-init.el] -** Use-Package -Install use-package and enable ':ensure t' globally. -#+begin_src emacs-lisp - (straight-use-package 'use-package) - (setq use-package-always-ensure t) - (use-package straight - :custom - (straight-use-package-by-default t)) -#+end_src -As a lifetime vim user I need to evil keys set up early ** Overrides -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (setq custom-file (locate-user-emacs-file "custom-vars.el")) (load custom-file 'noerror 'nomessage) (setq global-auto-revert-non-file-buffers 't) + (setq evil-want-keybinding nil) #+end_src ** Evil Mode *** Undo-Tree evil mode requires undo-tree so I have it set to compress the undo files and enable undo-tree mode globally -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package undo-tree :config (global-undo-tree-mode) (setq undo-tree-auto-save-history t) @@ -32,12 +23,12 @@ and enable undo-tree mode globally *** goto-chg It also requires goto-chg -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package goto-chg) #+end_src *** Evil Mode Now I hook in Evil mode -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package evil :config (evil-mode 1) (setq evil-search-module 'evil-search) @@ -54,7 +45,7 @@ Now I hook in Evil mode (kbd "e e") 'eval-buffer) #+end_src *** Evil Collection -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package evil-collection :after evil :ensure t :config @@ -70,39 +61,41 @@ Now I hook in Evil mode #+end_src ** UI -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package treemacs :config (evil-define-key 'normal 'global (kbd " f e") 'treemacs)) #+end_src Enable which key mode -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (which-key-mode) #+end_src ** Theming *** Fonts / icons Icons must be installed 'all-the-icons-install -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package all-the-icons :if (display-graphic-p)) + (use-package nerd-icons + :if (display-graphic-p)) (use-package rainbow-delimiters :hook (prog-mode . rainbow-delimiters-mode)) #+end_src *** UI System -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (require 'recentf) (recentf-mode 1) (setq history-length 50) (savehist-mode 1) (setq recentf-max-menu-items 25) (save-place-mode 1) - (menu-bar-mode -1) - (tool-bar-mode -1) + (menu-bar-mode 1) + (tool-bar-mode 1) (scroll-bar-mode -1) (global-display-line-numbers-mode 1) (hl-line-mode 1) (blink-cursor-mode 1) #+end_src *** Color Scheme -> load-theme here -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package doom-themes :ensure t :config @@ -118,9 +111,27 @@ Icons must be installed 'all-the-icons-install (doom-themes-org-config)) #+end_src ** Utilities +*** Lsp's +#+begin_src emacs-lisp :tangle yes + (use-package lsp-mode + :init + (setq lsp-keymap-prefix "C-c l") + :hook( + (python-mode . lsp) + (js-mode . lsp) + (typescript . lsp) + (rust-mode . lsp) + (lsp-mode . lsp-enable-which-key-integration) + (zig-mode . lsp) + (nim-mode . lsp) + ) + :commands lsp) + + ;; Tree-sitter grammars are provided by NixOS packages instead of runtime compilation +#+end_src *** Completion **** counsel -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package counsel :config (counsel-mode)) (use-package swiper) (use-package ivy :config @@ -152,7 +163,7 @@ Icons must be installed 'all-the-icons-install :init (ivy-rich-mode 1)) #+end_src **** helpful -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package helpful :config (global-set-key (kbd "C-h f") #'helpful-callable) @@ -164,7 +175,7 @@ Icons must be installed 'all-the-icons-install ** Org Mode *** Org Roam Presents a good example of use-package's capabilities. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (use-package org-roam :ensure t :after org :custom (org-roam-directory "~/org/roam") :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) @@ -178,13 +189,9 @@ Presents a good example of use-package's capabilities. (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) (setq org-roam-database-connector 'sqlite-builtin) - (setq org-roam-capture-templates '(("d" "default" plain "%?" - :target (file+head "${slug}.org" - "#+title: ${title}\n") - :unnarrowed t))) #+end_src -#+begin_src - (org-roam-capture-templates +#+begin_src emacs-lisp :tangle yes + (setq org-roam-capture-templates '(("d" "default" plain "%?" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") @@ -199,13 +206,13 @@ Presents a good example of use-package's capabilities. :unnarrowed t) ("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: Project") - :unnarrowed t)) + :unnarrowed t))) #+end_src **** Capture Templates -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes #+end_src *** Org Agenda -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (setq org-columns-default-format "%50ITEM(Task) %10CLOCKSUM %16TIMESTAMP_IA") #+end_src *** Capture Templates @@ -214,7 +221,7 @@ Presents a good example of use-package's capabilities. :ID: e81c993e-995d-492f-af46-73928c0a4fbd :END: [https://d12frosted.io/posts/2020-06-23-task-management-with-roam-vol1.html] -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (setq org-capture-templates '(("t" "todo" entry (file org-default-notes-file) "* TODO %?\n%u\n%a\n" :clock-in t :clock-resume t) @@ -227,7 +234,7 @@ Presents a good example of use-package's capabilities. ("n" "Next Task" entry (file+headline org-default-notes-file "Tasks") "** NEXT %? \nDEADLINE: %t") )) #+end_src -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle yes (setq org-agenda-prefix-format '((agenda . " %i %-12(vulpea-agenda-category)%?-12t% s") (todo . " %i %-12(vulpea-agenda-category) ") @@ -385,49 +392,3 @@ Presents a good example of use-package's capabilities. (add-hook 'vulpea-insert-handle-functions #'my-vulpea-insert-handle) #+end_src - -* EXWM -#+begin_src emacs-lisp - (require 'exwm) - ;; Set the initial workspace number. - (setq exwm-workspace-number 4) - ;; Make class name the buffer name. - (add-hook 'exwm-update-class-hook - (lambda () (exwm-workspace-rename-buffer exwm-class-name))) - ;; Global keybindings. - (setq exwm-input-global-keys - `(([?\s-r] . exwm-reset) ;; s-r: Reset (to line-mode). - ([?\s-w] . exwm-workspace-switch) ;; s-w: Switch workspace. - ([?\s-&] . (lambda (cmd) ;; s-&: Launch application. - (interactive (list (read-shell-command "$ "))) - (start-process-shell-command cmd nil cmd))) - ;; s-N: Switch to certain workspace. - ,@(mapcar (lambda (i) - `(,(kbd (format "s-%d" i)) . - (lambda () - (interactive) - (exwm-workspace-switch-create ,i)))) - (number-sequence 0 9)))) - ;; Enable EXWM - ;; let's get encryption established - (setenv "GPG_AGENT_INFO" nil) ;; use emacs pinentry - (setq auth-source-debug t) - - (setq epg-gpg-program "gpg2") ;; not necessary - (require 'epa-file) - (epa-file-enable) - (setq epa-pinentry-mode 'loopback) - (setq epg-pinentry-mode 'loopback) - (pinentry-start) - - (require 'org-crypt) - (org-crypt-use-before-save-magic) - (require 'exwm-randr) - (require 'exwm-systemtray) - (setq exwm-randr-workspace-output-plist '(o "eDP-1")) - (add-hook 'exwm-randr-screen-change-hook - (lambda () - (start-process-shell-command - "xrandr" nil "xrandr --output eDP-1 --scale .5 --filter nearest"))) - (exwm-randr-enable) - (exwm-systemtray-enable) diff --git a/modules/configurations/configuration-xps13.nix b/modules/configurations/configuration-xps13.nix index 475db4f..3b42606 100644 --- a/modules/configurations/configuration-xps13.nix +++ b/modules/configurations/configuration-xps13.nix @@ -39,63 +39,6 @@ enableDefaultPackages = true; fontDir.enable = true; packages = with pkgs; [ - (pkgs.emacsWithPackagesFromUsePackage { - # Your Emacs config file. Org mode babel files are also - # supported. - # NB: Config files cannot contain unicode characters, since - # they're being parsed in nix, which lacks unicode - # support. - # config = ./emacs.org; - config = ../../home/emacs.org; - # config = ./emacs.el; - - # Whether to include your config as a default init file. - # If being bool, the value of config is used. - # Its value can also be a derivation like this if you want to do some - # substitution: - # defaultInitFile = pkgs.substituteAll { - # name = "default.el"; - # src = ./emacs.el; - # inherit (config.xdg) configHome dataHome; - # }; - defaultInitFile = true; - - # Package is optional, defaults to pkgs.emacs - # package = pkgs.emacs-git; - package = pkgs.emacs-unstable-pgtk; - # By default emacsWithPackagesFromUsePackage will only pull in - # packages with `:ensure`, `:ensure t` or `:ensure `. - # Setting `alwaysEnsure` to `true` emulates `use-package-always-ensure` - # and pulls in all use-package references not explicitly disabled via - # `:ensure nil` or `:disabled`. - # Note that this is NOT recommended unless you've actually set - # `use-package-always-ensure` to `t` in your config. - alwaysEnsure = true; - - # For Org mode babel files, by default only code blocks with - # `:tangle yes` are considered. Setting `alwaysTangle` to `true` - # will include all code blocks missing the `:tangle` argument, - # defaulting it to `yes`. - # Note that this is NOT recommended unless you have something like - # `#+PROPERTY: header-args:emacs-lisp :tangle yes` in your config, - # which defaults `:tangle` to `yes`. - alwaysTangle = true; - - # Optionally provide extra packages not in the configuration file. - # This can also include extra executables to be run by Emacs (linters, - # language servers, formatters, etc) - extraEmacsPackages = epkgs: [ - epkgs.cask - pkgs.shellcheck - ]; - - # Optionally override derivations. - override = final: prev: { - weechat = prev.melpaPackages.weechat.overrideAttrs(old: { - patches = [ ./weechat-el.patch ]; - }); - }; - }) noto-fonts noto-fonts-cjk-sans noto-fonts-emoji @@ -127,6 +70,71 @@ vim curl age + (pkgs.emacsWithPackagesFromUsePackage { + # Your Emacs config file. Org mode babel files are also + # supported. + # NB: Config files cannot contain unicode characters, since + # they're being parsed in nix, which lacks unicode + # support. + # config = ./emacs.org; + config = ../../home/emacs.org; + # config = ./emacs.el; + + # Whether to include your config as a default init file. + # If being bool, the value of config is used. + # Its value can also be a derivation like this if you want to do some + # substitution: + # defaultInitFile = pkgs.substituteAll { + # name = "default.el"; + # src = ./emacs.el; + # inherit (config.xdg) configHome dataHome; + # }; + defaultInitFile = true; + + # Package is optional, defaults to pkgs.emacs + # package = pkgs.emacs-git; + package = pkgs.emacs-unstable-pgtk; + # By default emacsWithPackagesFromUsePackage will only pull in + # packages with `:ensure`, `:ensure t` or `:ensure `. + # Setting `alwaysEnsure` to `true` emulates `use-package-always-ensure` + # and pulls in all use-package references not explicitly disabled via + # `:ensure nil` or `:disabled`. + # Note that this is NOT recommended unless you've actually set + # `use-package-always-ensure` to `t` in your config. + alwaysEnsure = true; + + # For Org mode babel files, by default only code blocks with + # `:tangle yes` are considered. Setting `alwaysTangle` to `true` + # will include all code blocks missing the `:tangle` argument, + # defaulting it to `yes`. + # Note that this is NOT recommended unless you have something like + # `#+PROPERTY: header-args:emacs-lisp :tangle yes` in your config, + # which defaults `:tangle` to `yes`. + alwaysTangle = true; + + # Optionally provide extra packages not in the configuration file. + # This can also include extra executables to be run by Emacs (linters, + # language servers, formatters, etc) + extraEmacsPackages = epkgs: [ + epkgs.cask + pkgs.shellcheck + # Additional packages needed by emacs.org config + epkgs.s # string manipulation library used by vulpea functions + # Language servers for lsp-mode + # pkgs.basedpyright # Python LSP + pkgs.typescript-language-server # TypeScript/JavaScript LSP + pkgs.rust-analyzer # Rust LSP + pkgs.zls # Zig LSP + pkgs.nimlsp # Nim LSP + ]; + + # Optionally override derivations. + override = final: prev: { + weechat = prev.melpaPackages.weechat.overrideAttrs(old: { + patches = [ ./weechat-el.patch ]; + }); + }; + }) ]; #media-session.enable = true; diff --git a/modules/nixvim/nixvim.nix b/modules/nixvim/nixvim.nix new file mode 100644 index 0000000..864b5a9 --- /dev/null +++ b/modules/nixvim/nixvim.nix @@ -0,0 +1,46 @@ +{ config, pkgs, lib, inputs, ... }: +{ + imports = [ + ../which-key.nix + ]; + programs.nixvim = { + enable = true; + colorschemes = { + cyberdream = { + enable = true; + settings = { + borderless_telescope = true; + hide_fillchars = true; + italic_comments = true; + transparent = true; + }; + }; + }; + plugins = { + alpha = { + enable = true; + theme = "dashboard"; + }; + fzf-lua = { + lazyLoad.enable = true; + settings = { + files = { + color_icons = true; + file_icons = true; + find_opts = { + __raw = "[[-type f -not -path '*.git/objects*' -not -path '*.env*']]"; + }; + multiprocess = true; + prompt = "󰆤 ";" + }; + winopts = { + col = 0.3; + height = 0.4; + row = 0.99; + width = 0.93; + }; + }; + }; + }; + }; +} diff --git a/modules/nixvim/which-key.nix b/modules/nixvim/which-key.nix new file mode 100644 index 0000000..520289d --- /dev/null +++ b/modules/nixvim/which-key.nix @@ -0,0 +1,45 @@ +{ config, pkgs, lib, inputs, ... }: +{ + programs.nixvim.plugins.which-key = { + lazyLoad.enable = true; + settings = { + delay = 200; + expand = 1; + notify = false; + replace = { + desc = [ + ["" "SPACE"] + ["" "LEADER"] + ["<[cC][rR]>" "ENTER"] + ["<[tT][aA][bB]>" "TAB"] + ["" "S-TAB"] + ["<[bB][sS]>" "BACKSPACE"] + ]; + }; + spec = [ + { __unkeyed-1 = "b"; group = "Buffers"; icon = "󰓩 "; } + { __unkeyed = "c"; group = "Codesnap"; icon = "󰄄 "; mode = "v"; } + { __unkeyed-1 = "bs"; group = "Sort"; icon = "󰒺 "; } + { __unkeyed-1 = + [ + { __unkeyed-1 = "f"; group = "Normal Visual Group"; } + { __unkeyed-1 = "f"; group = "Normal Visual Group in Group"; } + ]; + mode = ["n" "v"]; + } + { __unkeyed-1 = "w"; group = "windows"; proxy = ""; } + { __unkeyed-1 = "cS"; __unkeyed-2 = "CodeSnapSave"; desc = "Save"; mode = "v"; } + { __unkeyed-1 = "db"; __unkeyed-2 = { + __raw = ''function() require("dap").toggle_breakpoint() end''; + }; + desc = "Breakpoint toggle"; + mode = "n"; + silent = true; + } + ]; + win = { + border = "rounded"; + }; + }; + }; +}