diff --git a/flake.lock b/flake.lock index 69ad1fa..e4124d0 100644 --- a/flake.lock +++ b/flake.lock @@ -139,11 +139,11 @@ ] }, "locked": { - "lastModified": 1753447519, - "narHash": "sha256-Aj4/4z2Is7l/yrseAG4prKzk6dJ4UAHraOW7FwrJHD4=", + "lastModified": 1754753395, + "narHash": "sha256-JDKf3Hs6qwLIuubr2wtFdxVw2DHEK01eI0PUXqECws0=", "ref": "refs/heads/main", - "rev": "bac2f15668c69ef6c3a02efb2a3660e95266e7dc", - "revCount": 8682, + "rev": "c1a87e5c6a15c527419671b7ea679716c1074891", + "revCount": 8950, "type": "git", "url": "https://git.clan.lol/clan/clan-core" }, @@ -298,11 +298,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1753121425, - "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", + "lastModified": 1754487366, + "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", + "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "type": "github" }, "original": { @@ -397,11 +397,11 @@ ] }, "locked": { - "lastModified": 1750779888, - "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", + "lastModified": 1754416808, + "narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", + "rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864", "type": "github" }, "original": { @@ -456,11 +456,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1753376980, - "narHash": "sha256-h7Say1U7r1ke3mfg3yvbzYnk3izmJ2g1zXzX5APNA8Q=", + "lastModified": 1754613249, + "narHash": "sha256-v62rsM5v2jFLNx9Wga/8C7kSSZaMKzPovRGEMiswtU4=", "owner": "helix-editor", "repo": "helix", - "rev": "4281228da35b02b0dcca3b4772b93d48d79ce046", + "rev": "18572973e6332101810169668894a99261bcd96b", "type": "github" }, "original": { @@ -498,11 +498,11 @@ ] }, "locked": { - "lastModified": 1753595562, - "narHash": "sha256-Ci88mAdtiP5RQkYmVhRUq69iYPMM7/lS9/mw+FnC7DE=", + "lastModified": 1754613544, + "narHash": "sha256-ueR1mGX4I4DWfDRRxxMphbKDNisDeMPMusN72VV1+cc=", "owner": "nix-community", "repo": "home-manager", - "rev": "710771af3d1c8c3f86a9e5d562616973ed5f3f21", + "rev": "cc2fa2331aebf9661d22bb507d362b39852ac73f", "type": "github" }, "original": { @@ -562,11 +562,11 @@ ] }, "locked": { - "lastModified": 1753418232, - "narHash": "sha256-fMVYDv0/7v4qrbZmzfqkFeEpelME4bT5JQBfXL9zl/E=", + "lastModified": 1754639028, + "narHash": "sha256-w1+XzPBAZPbeGLMAgAlOjIquswo6Q42PMep9KSrRzOA=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "ca1145d927d177194fec4b0bf47a4b7dd2ed613d", + "rev": "d49809278138d17be77ab0ef5506b26dc477fa62", "type": "github" }, "original": { @@ -577,11 +577,11 @@ }, "master": { "locked": { - "lastModified": 1753451667, - "narHash": "sha256-9F6KC3S74kuVipcOjHby92DwKiNRECteaPrXSLN3ooE=", + "lastModified": 1754754138, + "narHash": "sha256-zcsoBOXLflwWAz1w0EJAemKrlPjOKhgbGBSULMtAUpw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "42bf885286192fc8dc5a1a44f4681146ad3dc65c", + "rev": "e83eaf441be2138f1350b84eeb2ee685ca9c064d", "type": "github" }, "original": { @@ -633,11 +633,11 @@ ] }, "locked": { - "lastModified": 1753435696, - "narHash": "sha256-WnFRQSzIUEt2QDpJ4QKe01ygU8EDxSfCp6EENWCBqeg=", + "lastModified": 1754641381, + "narHash": "sha256-eMoujl/X1lbdjRbC/HHCpZmUb5tqTAYSL1hocy+o7nc=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "57acedd7c9b2b2e6d23cc4c3110e541061a3b6d9", + "rev": "83aaf3085f808dec9ea1b5d16b216875a8081b37", "type": "github" }, "original": { @@ -649,11 +649,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1753357541, - "narHash": "sha256-GzQlU+hwtcHJF0KI2DWYIPSJ9zkHH7Erpe/ChPorZX8=", + "lastModified": 1754610154, + "narHash": "sha256-ORfF40X4BGiFxnLNQbdsQbUTW4TkUHfPqyZWHaYL5NE=", "owner": "neovim", "repo": "neovim", - "rev": "e512efe3696b2ed18db55683fecf42bbc733c767", + "rev": "038eb01b41b66379f75164507571497929f8847c", "type": "github" }, "original": { @@ -674,11 +674,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1753374784, - "narHash": "sha256-R6vHaUJiehdXSnzZqCOxmtmAnHA4GBOpS/UKydzAI38=", + "lastModified": 1754744872, + "narHash": "sha256-rcMHMs+dFWaDXev092gfxTfxHEWcUY/6SRV+cseNevQ=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "da95771a65821bc98118cf3478eb2fc6fbfe035a", + "rev": "346fc31bcc4d2dbcc3e8ce8dbb622e4255ff54b7", "type": "github" }, "original": { @@ -707,11 +707,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1752870529, - "narHash": "sha256-23DJk5EfEDCq7Xy1QELcayG0VxbbWpdQ6t7jbhae1Ok=", + "lastModified": 1754742008, + "narHash": "sha256-Tp0FG7VpLudVEC622d91z2hbdfPLCXxw0Nv43iNN4O0=", "owner": "YaLTeR", "repo": "niri", - "rev": "fefc0bc0a71556eb75352e2b611e50eb5d3bf9c2", + "rev": "67361f88fd01974ebee4cf80f0e29c87d805cc39", "type": "github" }, "original": { @@ -770,11 +770,11 @@ ] }, "locked": { - "lastModified": 1752985182, - "narHash": "sha256-sX8Neff8lp3TCHai6QmgLr5AD8MdsQQX3b52C1DVXR8=", + "lastModified": 1754195341, + "narHash": "sha256-YL71IEf2OugH3gmAsxQox6BJI0KOcHKtW2QqT/+s2SA=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "fafdcb505ba605157ff7a7eeea452bc6d6cbc23c", + "rev": "b7fcd4e26d67fca48e77de9b0d0f954b18ae9562", "type": "github" }, "original": { @@ -846,11 +846,11 @@ "nixpkgs-25_05": "nixpkgs-25_05" }, "locked": { - "lastModified": 1753285640, - "narHash": "sha256-ofa021NeHDXAxg5J8mSnn8rHa393PAlD85ZCetP4Qa0=", + "lastModified": 1754605910, + "narHash": "sha256-kVWxzm44ywJTb4REfwWCYXnROISykG0yE+X5A3Gov24=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "ce87c8a9771d1a20c3fa3b60113b9b0821627dcb", + "rev": "57d9624c71ca65bee69b30d72b11f6c5257e9500", "type": "gitlab" }, "original": { @@ -861,11 +861,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1753399495, - "narHash": "sha256-7XG/QBqhrYOyA2houjRTL2NMa7IKZZ/somBqr+Q/6Wo=", + "lastModified": 1754651824, + "narHash": "sha256-aB7ft6njy9EJfuW+rdToNChfRrHNRw/yTg5cSEnG+HI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0d00f23f023b7215b3f1035adb5247c8ec180dbc", + "rev": "b069b7c1e2fe1a3a24221428558bf44128d3d5c8", "type": "github" }, "original": { @@ -877,11 +877,11 @@ }, "nixpkgs-25_05": { "locked": { - "lastModified": 1751741127, - "narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=", + "lastModified": 1753749649, + "narHash": "sha256-+jkEZxs7bfOKfBIk430K+tK9IvXlwzqQQnppC2ZKFj4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "29e290002bfff26af1db6f64d070698019460302", + "rev": "1f08a4df998e21f4e8be8fb6fbf61d11a1a5076a", "type": "github" }, "original": { @@ -893,11 +893,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1751159883, - "narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", + "lastModified": 1753579242, + "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", + "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", "type": "github" }, "original": { @@ -908,11 +908,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1753345091, - "narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=", + "lastModified": 1754689972, + "narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9", + "rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a", "type": "github" }, "original": { @@ -936,11 +936,11 @@ ] }, "locked": { - "lastModified": 1752976861, - "narHash": "sha256-59HcrqHfbSJUdmpzrAa9x8fW1PoS+ZGhCjL5k5HbyV8=", + "lastModified": 1754682350, + "narHash": "sha256-4Dgf0cA/ZJtj9eTzG0yNMRBcd5fll3hhWx2WdwltAP8=", "owner": "nix-community", "repo": "nixvim", - "rev": "0c50ed9349199219583cb1ed1a972d71e06039ec", + "rev": "832de87d40f9a40430372552ab0b583680187cf3", "type": "github" }, "original": { @@ -959,11 +959,11 @@ ] }, "locked": { - "lastModified": 1753449845, - "narHash": "sha256-gdRqSfE92ryPacbwlOB+9tLTTPj+Xv+DHezez+66Qrc=", + "lastModified": 1754750976, + "narHash": "sha256-zfVOpkqE5pSpfmdaQAzcz1tGWiUtcGEMZzzqSvZwGlI=", "owner": "nix-community", "repo": "NUR", - "rev": "5d2ec507162b53b1a947ca6e71bba25458d43756", + "rev": "e4b3278b92413a4da9bde04d888d6691e6bf5430", "type": "github" }, "original": { @@ -982,11 +982,11 @@ ] }, "locked": { - "lastModified": 1749730855, - "narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=", + "lastModified": 1754301638, + "narHash": "sha256-aRgzcPDd2axHFOuMlPLuzmDptUM2JU8mUL3jfgbBeyc=", "owner": "NuschtOS", "repo": "search", - "rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742", + "rev": "a60091045273484c040a91f5c229ba298f8ecc27", "type": "github" }, "original": { @@ -995,14 +995,30 @@ "type": "github" } }, + "plenary-nvim": { + "flake": false, + "locked": { + "lastModified": 1753570668, + "narHash": "sha256-9Un7ekhBxcnmFE1xjCCFTZ7eqIbmXvQexpnhduAg4M0=", + "owner": "nvim-lua", + "repo": "plenary.nvim", + "rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509", + "type": "github" + }, + "original": { + "owner": "nvim-lua", + "repo": "plenary.nvim", + "type": "github" + } + }, "rofi": { "flake": false, "locked": { - "lastModified": 1753534008, - "narHash": "sha256-TQiOBE94UzrFhqVYkgGN279YKBpTomdo8hecOQdwwOY=", + "lastModified": 1753699985, + "narHash": "sha256-/8DLDIy/+oG99BJzjsyKPyy5qOcbtzwFLW1WpZXaqag=", "owner": "davatorium", "repo": "rofi", - "rev": "8757f342d4470596688705a8040e9352842f2c05", + "rev": "dd3bb30d866189cc2df7b29018daf75ae8517e6d", "type": "github" }, "original": { @@ -1056,6 +1072,7 @@ "nixpkgs": "nixpkgs", "nixvim": "nixvim", "nur": "nur", + "plenary-nvim": "plenary-nvim", "rofi": "rofi", "rofi-nix": "rofi-nix", "stable": "stable", @@ -1112,11 +1129,11 @@ ] }, "locked": { - "lastModified": 1752544651, - "narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=", + "lastModified": 1754328224, + "narHash": "sha256-glPK8DF329/dXtosV7YSzRlF4n35WDjaVwdOMEoEXHA=", "owner": "Mic92", "repo": "sops-nix", - "rev": "2c8def626f54708a9c38a5861866660395bb3461", + "rev": "49021900e69812ba7ddb9e40f9170218a7eca9f4", "type": "github" }, "original": { @@ -1127,11 +1144,11 @@ }, "stable": { "locked": { - "lastModified": 1753345091, - "narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=", + "lastModified": 1754689972, + "narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9", + "rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a", "type": "github" }, "original": { @@ -1170,11 +1187,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1753553562, - "narHash": "sha256-CpTwdsrPU3UFy95Btg56RcVMgNpnw3C0DYTznE5aRq4=", + "lastModified": 1754597531, + "narHash": "sha256-OpC9/PBIuL2WEJUkcuD/wVxI8r+3o6f5RylSIefjHo4=", "owner": "nix-community", "repo": "stylix", - "rev": "af85565aba0f4749cb18b118a7333a0745920950", + "rev": "63bb34a66ad7d1af2e95ee20dd675896b2074c32", "type": "github" }, "original": { @@ -1286,11 +1303,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1748180480, - "narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=", + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", "owner": "tinted-theming", "repo": "schemes", - "rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", "type": "github" }, "original": { @@ -1302,11 +1319,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1748740859, - "narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=", + "lastModified": 1751159871, + "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "57d5f9683ff9a3b590643beeaf0364da819aedda", + "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", "type": "github" }, "original": { @@ -1318,11 +1335,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1725758778, - "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", + "lastModified": 1751158968, + "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", + "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", "type": "github" }, "original": { @@ -1338,11 +1355,11 @@ ] }, "locked": { - "lastModified": 1753439394, - "narHash": "sha256-Bv9h1AJegLI8uAhiJ1sZ4XAndYxhgf38tMgCQwiEpmc=", + "lastModified": 1754492133, + "narHash": "sha256-B+3g9+76KlGe34Yk9za8AF3RL+lnbHXkLiVHLjYVOAc=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "2673921c03d6e75fdf4aa93e025772608d1482cf", + "rev": "1298185c05a56bff66383a20be0b41a307f52228", "type": "github" }, "original": { @@ -1389,11 +1406,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1752338000, - "narHash": "sha256-Fxlp/yKtynug0jyuauAmvZU2SzHCfwlwWf85j+IvQ0U=", + "lastModified": 1754533920, + "narHash": "sha256-fCZ68Yud1sUCq6UNXj0SDyiBgVA8gJUE+14ZFGsFJG8=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "ba78881a68182ce338041846164cbfed0d70935c", + "rev": "e0d1dad25a158551ab58547b2ece4b7d5a19929c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 12afb59..c8eb338 100644 --- a/flake.nix +++ b/flake.nix @@ -165,6 +165,8 @@ # Neovim neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; nixvim.url = "github:nix-community/nixvim"; + plenary-nvim.url = "github:nvim-lua/plenary.nvim"; + plenary-nvim.flake = false; # Helix helix.url = "github:helix-editor/helix"; diff --git a/modules/moritz/programs/niri.nix b/modules/moritz/programs/niri.nix index 529ed06..2206f5a 100644 --- a/modules/moritz/programs/niri.nix +++ b/modules/moritz/programs/niri.nix @@ -7,7 +7,7 @@ }: let cfg = config.my.programs.niri; inherit (config.home-manager.users.moritz.lib.niri) actions; - inherit (lib) mkEnableOption getExe mkIf mkPackageOption; + inherit (lib) mkEnableOption mkIf mkPackageOption; in { imports = [ inputs.niri.nixosModules.niri @@ -64,10 +64,7 @@ in { enable = true; # start using systemd service - systemd = { - enable = true; - target = "niri.service"; - }; + systemd.enable = true; settings = { mainBar = { @@ -89,8 +86,12 @@ in { color = "000000"; }; }; - systemd.user.services.waybar.Unit.After = ["graphical-session.target"]; - systemd.user.services.swayidle.Unit.After = ["graphical-session.target"]; + + wayland.systemd.target = "niri.service"; + + systemd.user.services.waybar.Unit.After = [ "graphical-session.target" ]; + systemd.user.services.swayidle.Unit.After = [ "graphical-session.target" ]; + services.swayidle = { enable = true; events = [ @@ -115,16 +116,14 @@ in { command = "${pkgs.systemd}/bin/loginctl lock-session"; } ]; - systemdTarget = "niri.service"; }; services.dunst.enable = true; - services.kanshi = { - enable = true; - systemdTarget = "niri.service"; - }; + services.kanshi.enable = true; + programs.niri = { package = pkgs.niri; settings = { + xwayland-satellite.path = lib.getExe inputs.niri.packages.${pkgs.system}.xwayland-satellite-unstable; environment = { "NIXOS_OZONE_WL" = "1"; "QT_QPA_PLATFORM" = "wayland"; @@ -202,9 +201,6 @@ in { "XF86AudioRaiseVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+" "-l" "1.0"]; "XF86AudioLowerVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"]; }; - environment = { - DISPLAY = ":0"; - }; gestures.hot-corners.enable = false; layout = { border.enable = false; @@ -263,23 +259,6 @@ in { }; }; - systemd.user.services.xwayland-satellite = { - description = "Xwayland outside your Wayland"; - after = ["graphical-session.target"]; - wantedBy = ["graphical-session.target"]; - partOf = ["graphical-session.target"]; - bindsTo = ["graphical-session.target"]; - requisite = ["graphical-session.target"]; - serviceConfig = { - Type = "notify"; - Restart = "always"; - RestartSec = "1s"; - ExecStart = "${getExe pkgs.xwayland-satellite}"; - StandardOutput = "journal"; - NotifyAccess = "all"; - }; - }; - services = { dbus.enable = true; # use pipewire (needed for screensharing) diff --git a/modules/moritz/programs/nvim/options.lua b/modules/moritz/programs/nvim/options.lua index ae64e8b..f01fdd4 100644 --- a/modules/moritz/programs/nvim/options.lua +++ b/modules/moritz/programs/nvim/options.lua @@ -25,6 +25,7 @@ vim.opt.updatetime = 300 vim.opt.foldlevel = 99 vim.opt_local.spell = true vim.opt_local.spelllang = { "en", "de_20" } -- all English regions and new German spelling +vim.opt.winborder = "rounded" -- Abbreviations for common typos vim.cmd("cnoreabbrev W! w!") diff --git a/modules/moritz/programs/nvim/plugins/blink-cmp.nix b/modules/moritz/programs/nvim/plugins/blink-cmp.nix index 836e995..e7c2f55 100644 --- a/modules/moritz/programs/nvim/plugins/blink-cmp.nix +++ b/modules/moritz/programs/nvim/plugins/blink-cmp.nix @@ -1,6 +1,13 @@ -{...}: { +{ + lib, + config, + ... +}: let + lazydevEnabled = config.home-manager.users.moritz.programs.nixvim.plugins.lazydev.enable; +in { home-manager.users.moritz.programs.nixvim = { plugins.blink-compat.enable = true; + plugins.blink-ripgrep.enable = true; plugins.lsp.capabilities = /* lua @@ -16,16 +23,41 @@ }; appearance.nerd_font_variant = "mono"; sources = { - default = [ - "lsp" - "path" - "snippets" - "buffer" - "vimtex" - ]; - providers.vimtex = { - name = "vimtex"; - module = "blink.compat.source"; + default = + [ + "lsp" + "path" + "snippets" + "buffer" + "vimtex" + "ripgrep" + ] + ++ lib.optional lazydevEnabled "lazydev"; + providers = { + vimtex = { + name = "vimtex"; + module = "blink.compat.source"; + }; + ripgrep = { + module = "blink-ripgrep"; + name = "Ripgrep"; + transform_items.__raw = '' + function(_, items) + for _, item in ipairs(items) do + -- example: append a description to easily distinguish rg results + item.labelDetails = { + description = "(rg)", + } + end + return items + end''; + }; + lazydev = lib.mkIf lazydevEnabled { + name = "LazyDev"; + module = "lazydev.integrations.blink"; + # make lazydev completions top priority (see `:h blink.cmp`) + score_offset = 100; + }; }; }; signature.enabled = true; diff --git a/modules/moritz/programs/nvim/plugins/flash.nix b/modules/moritz/programs/nvim/plugins/flash.nix new file mode 100644 index 0000000..91b70c4 --- /dev/null +++ b/modules/moritz/programs/nvim/plugins/flash.nix @@ -0,0 +1,25 @@ +_: { + home-manager.users.moritz.programs.nixvim = { + plugins.flash.enable = true; + keymaps = [ + { + key = "s"; + action.__raw = ''require("flash").jump''; + options.desc = "Flash"; + mode = ["n" "x" "o"]; + } + { + key = "S"; + action.__raw = ''require("flash").treesitter''; + options.desc = "Flash Treesitter"; + mode = ["n" "x" "o"]; + } + { + key = "r"; + action.__raw = ''require("flash").remote''; + options.desc = "Remote flash"; + mode = ["o"]; + } + ]; + }; +} diff --git a/modules/moritz/programs/nvim/plugins/keymaps.nix b/modules/moritz/programs/nvim/plugins/keymaps.nix index 99f06f1..f0c5536 100644 --- a/modules/moritz/programs/nvim/plugins/keymaps.nix +++ b/modules/moritz/programs/nvim/plugins/keymaps.nix @@ -25,6 +25,24 @@ options.desc = "Yank"; mode = ["v"]; } + { + key = "y"; + action = "\"+ygv"; + options.desc = "Yank to system clipboard"; + mode = ["v" "x"]; + } + { + key = "y"; + action = "\"+y"; + options.desc = "Yank to system clipboard"; + mode = ["n"]; + } + { + key = "d"; + action = "\"+d"; + options.desc = "Delete to system clipboard"; + mode = ["n" "v" "x"]; + } ]; }; } diff --git a/modules/moritz/programs/nvim/plugins/lazydev.nix b/modules/moritz/programs/nvim/plugins/lazydev.nix new file mode 100644 index 0000000..b65f840 --- /dev/null +++ b/modules/moritz/programs/nvim/plugins/lazydev.nix @@ -0,0 +1,3 @@ +_: { + home-manager.users.moritz.programs.nixvim.plugins.lazydev.enable = true; +} diff --git a/modules/moritz/programs/nvim/plugins/lsp.nix b/modules/moritz/programs/nvim/plugins/lsp.nix index 7cb5bc9..5a62ae1 100644 --- a/modules/moritz/programs/nvim/plugins/lsp.nix +++ b/modules/moritz/programs/nvim/plugins/lsp.nix @@ -28,37 +28,61 @@ }, } ''; + plugins.actions-preview.enable = true; plugins.lsp = { enable = true; inlayHints = true; - servers.rust_analyzer = { - enable = true; - installRustc = false; - installCargo = false; - settings.files.watcher = "server"; - }; - servers.lexical.enable = true; - servers.lua_ls.enable = true; - servers.nil_ls.enable = true; - servers.nixd.enable = true; - servers.nixd.extraOptions.settings.nixd = { - nixpkgs = { - expr = "import { }"; + servers = { + rust_analyzer = { + enable = true; + installRustc = false; + installCargo = false; + settings.files.watcher = "server"; }; - options = { - nixos = { - expr = ''builtins.head (builtins.attrValues ((builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations).options''; + lexical.enable = true; + lua_ls.enable = true; + nil_ls.enable = true; + nixd.enable = true; + nixd.extraOptions.settings.nixd = { + nixpkgs = { + expr = "import { }"; }; - "flake-parts" = { - expr = ''(builtins.getFlake ("git+file://" + toString ./.)).debug.options''; - }; - "flake-parts2" = { - expr = ''(builtins.getFlake ("git+file://" + toString ./.)).currentSystem.options''; + options = { + nixos = { + expr = ''builtins.head (builtins.attrValues ((builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations).options''; + }; + "flake-parts" = { + expr = ''(builtins.getFlake ("git+file://" + toString ./.)).debug.options''; + }; + "flake-parts2" = { + expr = ''(builtins.getFlake ("git+file://" + toString ./.)).currentSystem.options''; + }; }; }; + tinymist.enable = true; + }; + keymaps = { + diagnostic = { + "]j" = "goto_next"; + "[k" = "goto_prev"; + }; + lspBuf = { + K = "hover"; + gD = "references"; + gd = "definition"; + gi = "implementation"; + gt = "type_definition"; + "r" = "rename"; + }; + extra = [ + { + key = "q"; + action.__raw = ''require("actions-preview").code_actions''; + options.desc = "Quick/code action"; + } + ]; }; - servers.tinymist.enable = true; }; }; } diff --git a/modules/moritz/programs/nvim/plugins/lspsaga.nix b/modules/moritz/programs/nvim/plugins/lspsaga.nix deleted file mode 100644 index a93702b..0000000 --- a/modules/moritz/programs/nvim/plugins/lspsaga.nix +++ /dev/null @@ -1,40 +0,0 @@ -{...}: { - home-manager.users.moritz.programs.nixvim = { - plugins = { - lspsaga = { - enable = true; - codeAction.keys.quit = ""; - lightbulb.virtualText = false; - }; - web-devicons.enable = true; - }; - keymapsOnEvents = { - LspAttach = [ - { - key = "q"; - action = "Lspsaga code_action"; - options.desc = "Quickfix"; - options.buffer = true; - } - { - key = "gd"; - action = "Lspsaga goto_definition"; - options.desc = "Goto Definition"; - options.buffer = true; - } - { - key = "r"; - action = "Lspsaga rename"; - options.desc = "Rename"; - options.buffer = true; - } - { - key = "K"; - action = "Lspsaga hover_doc"; - options.desc = "Hover"; - options.buffer = true; - } - ]; - }; - }; -} diff --git a/modules/moritz/programs/nvim/plugins/oil.nix b/modules/moritz/programs/nvim/plugins/oil.nix index aee93f5..f26ef76 100644 --- a/modules/moritz/programs/nvim/plugins/oil.nix +++ b/modules/moritz/programs/nvim/plugins/oil.nix @@ -4,5 +4,13 @@ performance.combinePlugins.standalonePlugins = [ "oil.nvim" ]; + keymaps = [ + { + key = "e"; + action = "Oil"; + options.desc = "Explore files"; + mode = ["n"]; + } + ]; }; } diff --git a/modules/moritz/programs/nvim/plugins/telescope.nix b/modules/moritz/programs/nvim/plugins/telescope.nix index ae69da1..560b65c 100644 --- a/modules/moritz/programs/nvim/plugins/telescope.nix +++ b/modules/moritz/programs/nvim/plugins/telescope.nix @@ -1,5 +1,22 @@ -_: { +{pkgs, inputs, ... }: { + # HACK: to fix window borders + nixpkgs.overlays = [ + (final: prev: { + vimPlugins = prev.vimPlugins // { + plenary-nvim = prev.vimPlugins.plenary-nvim.overrideAttrs (old:{ + src = inputs.plenary-nvim; + version = "unstable"; + }); + }; + }) + ]; + home-manager.users.moritz.programs.nixvim = { + # HACK: also + extraPlugins = with pkgs.vimPlugins; [ + plenary-nvim + ]; + autoCmd = [ { event = ["VimEnter"]; @@ -12,6 +29,7 @@ _: { ''; } ]; + plugins = { telescope = { enable = true; @@ -34,7 +52,7 @@ _: { }; "fl" = { action = "current_buffer_fuzzy_find"; - options.desc = "Search lines"; + options.desc = "Find lines"; }; "fg" = { action = "live_grep"; @@ -42,7 +60,7 @@ _: { }; "fh" = { action = "help_tags"; - options.desc = "Help tags"; + options.desc = "Find help tags"; }; "fr" = { action = "oldfiles"; @@ -50,7 +68,7 @@ _: { }; "fc" = { action = "commands"; - options.desc = "Commands"; + options.desc = "Find Commands"; }; }; };