diff --git a/flake.lock b/flake.lock index e4124d0..69ad1fa 100644 --- a/flake.lock +++ b/flake.lock @@ -139,11 +139,11 @@ ] }, "locked": { - "lastModified": 1754753395, - "narHash": "sha256-JDKf3Hs6qwLIuubr2wtFdxVw2DHEK01eI0PUXqECws0=", + "lastModified": 1753447519, + "narHash": "sha256-Aj4/4z2Is7l/yrseAG4prKzk6dJ4UAHraOW7FwrJHD4=", "ref": "refs/heads/main", - "rev": "c1a87e5c6a15c527419671b7ea679716c1074891", - "revCount": 8950, + "rev": "bac2f15668c69ef6c3a02efb2a3660e95266e7dc", + "revCount": 8682, "type": "git", "url": "https://git.clan.lol/clan/clan-core" }, @@ -298,11 +298,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1754487366, - "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", + "lastModified": 1753121425, + "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", + "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", "type": "github" }, "original": { @@ -397,11 +397,11 @@ ] }, "locked": { - "lastModified": 1754416808, - "narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=", + "lastModified": 1750779888, + "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864", + "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", "type": "github" }, "original": { @@ -456,11 +456,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1754613249, - "narHash": "sha256-v62rsM5v2jFLNx9Wga/8C7kSSZaMKzPovRGEMiswtU4=", + "lastModified": 1753376980, + "narHash": "sha256-h7Say1U7r1ke3mfg3yvbzYnk3izmJ2g1zXzX5APNA8Q=", "owner": "helix-editor", "repo": "helix", - "rev": "18572973e6332101810169668894a99261bcd96b", + "rev": "4281228da35b02b0dcca3b4772b93d48d79ce046", "type": "github" }, "original": { @@ -498,11 +498,11 @@ ] }, "locked": { - "lastModified": 1754613544, - "narHash": "sha256-ueR1mGX4I4DWfDRRxxMphbKDNisDeMPMusN72VV1+cc=", + "lastModified": 1753595562, + "narHash": "sha256-Ci88mAdtiP5RQkYmVhRUq69iYPMM7/lS9/mw+FnC7DE=", "owner": "nix-community", "repo": "home-manager", - "rev": "cc2fa2331aebf9661d22bb507d362b39852ac73f", + "rev": "710771af3d1c8c3f86a9e5d562616973ed5f3f21", "type": "github" }, "original": { @@ -562,11 +562,11 @@ ] }, "locked": { - "lastModified": 1754639028, - "narHash": "sha256-w1+XzPBAZPbeGLMAgAlOjIquswo6Q42PMep9KSrRzOA=", + "lastModified": 1753418232, + "narHash": "sha256-fMVYDv0/7v4qrbZmzfqkFeEpelME4bT5JQBfXL9zl/E=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "d49809278138d17be77ab0ef5506b26dc477fa62", + "rev": "ca1145d927d177194fec4b0bf47a4b7dd2ed613d", "type": "github" }, "original": { @@ -577,11 +577,11 @@ }, "master": { "locked": { - "lastModified": 1754754138, - "narHash": "sha256-zcsoBOXLflwWAz1w0EJAemKrlPjOKhgbGBSULMtAUpw=", + "lastModified": 1753451667, + "narHash": "sha256-9F6KC3S74kuVipcOjHby92DwKiNRECteaPrXSLN3ooE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e83eaf441be2138f1350b84eeb2ee685ca9c064d", + "rev": "42bf885286192fc8dc5a1a44f4681146ad3dc65c", "type": "github" }, "original": { @@ -633,11 +633,11 @@ ] }, "locked": { - "lastModified": 1754641381, - "narHash": "sha256-eMoujl/X1lbdjRbC/HHCpZmUb5tqTAYSL1hocy+o7nc=", + "lastModified": 1753435696, + "narHash": "sha256-WnFRQSzIUEt2QDpJ4QKe01ygU8EDxSfCp6EENWCBqeg=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "83aaf3085f808dec9ea1b5d16b216875a8081b37", + "rev": "57acedd7c9b2b2e6d23cc4c3110e541061a3b6d9", "type": "github" }, "original": { @@ -649,11 +649,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1754610154, - "narHash": "sha256-ORfF40X4BGiFxnLNQbdsQbUTW4TkUHfPqyZWHaYL5NE=", + "lastModified": 1753357541, + "narHash": "sha256-GzQlU+hwtcHJF0KI2DWYIPSJ9zkHH7Erpe/ChPorZX8=", "owner": "neovim", "repo": "neovim", - "rev": "038eb01b41b66379f75164507571497929f8847c", + "rev": "e512efe3696b2ed18db55683fecf42bbc733c767", "type": "github" }, "original": { @@ -674,11 +674,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1754744872, - "narHash": "sha256-rcMHMs+dFWaDXev092gfxTfxHEWcUY/6SRV+cseNevQ=", + "lastModified": 1753374784, + "narHash": "sha256-R6vHaUJiehdXSnzZqCOxmtmAnHA4GBOpS/UKydzAI38=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "346fc31bcc4d2dbcc3e8ce8dbb622e4255ff54b7", + "rev": "da95771a65821bc98118cf3478eb2fc6fbfe035a", "type": "github" }, "original": { @@ -707,11 +707,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1754742008, - "narHash": "sha256-Tp0FG7VpLudVEC622d91z2hbdfPLCXxw0Nv43iNN4O0=", + "lastModified": 1752870529, + "narHash": "sha256-23DJk5EfEDCq7Xy1QELcayG0VxbbWpdQ6t7jbhae1Ok=", "owner": "YaLTeR", "repo": "niri", - "rev": "67361f88fd01974ebee4cf80f0e29c87d805cc39", + "rev": "fefc0bc0a71556eb75352e2b611e50eb5d3bf9c2", "type": "github" }, "original": { @@ -770,11 +770,11 @@ ] }, "locked": { - "lastModified": 1754195341, - "narHash": "sha256-YL71IEf2OugH3gmAsxQox6BJI0KOcHKtW2QqT/+s2SA=", + "lastModified": 1752985182, + "narHash": "sha256-sX8Neff8lp3TCHai6QmgLr5AD8MdsQQX3b52C1DVXR8=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "b7fcd4e26d67fca48e77de9b0d0f954b18ae9562", + "rev": "fafdcb505ba605157ff7a7eeea452bc6d6cbc23c", "type": "github" }, "original": { @@ -846,11 +846,11 @@ "nixpkgs-25_05": "nixpkgs-25_05" }, "locked": { - "lastModified": 1754605910, - "narHash": "sha256-kVWxzm44ywJTb4REfwWCYXnROISykG0yE+X5A3Gov24=", + "lastModified": 1753285640, + "narHash": "sha256-ofa021NeHDXAxg5J8mSnn8rHa393PAlD85ZCetP4Qa0=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "57d9624c71ca65bee69b30d72b11f6c5257e9500", + "rev": "ce87c8a9771d1a20c3fa3b60113b9b0821627dcb", "type": "gitlab" }, "original": { @@ -861,11 +861,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1754651824, - "narHash": "sha256-aB7ft6njy9EJfuW+rdToNChfRrHNRw/yTg5cSEnG+HI=", + "lastModified": 1753399495, + "narHash": "sha256-7XG/QBqhrYOyA2houjRTL2NMa7IKZZ/somBqr+Q/6Wo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b069b7c1e2fe1a3a24221428558bf44128d3d5c8", + "rev": "0d00f23f023b7215b3f1035adb5247c8ec180dbc", "type": "github" }, "original": { @@ -877,11 +877,11 @@ }, "nixpkgs-25_05": { "locked": { - "lastModified": 1753749649, - "narHash": "sha256-+jkEZxs7bfOKfBIk430K+tK9IvXlwzqQQnppC2ZKFj4=", + "lastModified": 1751741127, + "narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1f08a4df998e21f4e8be8fb6fbf61d11a1a5076a", + "rev": "29e290002bfff26af1db6f64d070698019460302", "type": "github" }, "original": { @@ -893,11 +893,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1753579242, - "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", + "lastModified": 1751159883, + "narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", + "rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", "type": "github" }, "original": { @@ -908,11 +908,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1754689972, - "narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=", + "lastModified": 1753345091, + "narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a", + "rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9", "type": "github" }, "original": { @@ -936,11 +936,11 @@ ] }, "locked": { - "lastModified": 1754682350, - "narHash": "sha256-4Dgf0cA/ZJtj9eTzG0yNMRBcd5fll3hhWx2WdwltAP8=", + "lastModified": 1752976861, + "narHash": "sha256-59HcrqHfbSJUdmpzrAa9x8fW1PoS+ZGhCjL5k5HbyV8=", "owner": "nix-community", "repo": "nixvim", - "rev": "832de87d40f9a40430372552ab0b583680187cf3", + "rev": "0c50ed9349199219583cb1ed1a972d71e06039ec", "type": "github" }, "original": { @@ -959,11 +959,11 @@ ] }, "locked": { - "lastModified": 1754750976, - "narHash": "sha256-zfVOpkqE5pSpfmdaQAzcz1tGWiUtcGEMZzzqSvZwGlI=", + "lastModified": 1753449845, + "narHash": "sha256-gdRqSfE92ryPacbwlOB+9tLTTPj+Xv+DHezez+66Qrc=", "owner": "nix-community", "repo": "NUR", - "rev": "e4b3278b92413a4da9bde04d888d6691e6bf5430", + "rev": "5d2ec507162b53b1a947ca6e71bba25458d43756", "type": "github" }, "original": { @@ -982,11 +982,11 @@ ] }, "locked": { - "lastModified": 1754301638, - "narHash": "sha256-aRgzcPDd2axHFOuMlPLuzmDptUM2JU8mUL3jfgbBeyc=", + "lastModified": 1749730855, + "narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=", "owner": "NuschtOS", "repo": "search", - "rev": "a60091045273484c040a91f5c229ba298f8ecc27", + "rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742", "type": "github" }, "original": { @@ -995,30 +995,14 @@ "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": 1753699985, - "narHash": "sha256-/8DLDIy/+oG99BJzjsyKPyy5qOcbtzwFLW1WpZXaqag=", + "lastModified": 1753534008, + "narHash": "sha256-TQiOBE94UzrFhqVYkgGN279YKBpTomdo8hecOQdwwOY=", "owner": "davatorium", "repo": "rofi", - "rev": "dd3bb30d866189cc2df7b29018daf75ae8517e6d", + "rev": "8757f342d4470596688705a8040e9352842f2c05", "type": "github" }, "original": { @@ -1072,7 +1056,6 @@ "nixpkgs": "nixpkgs", "nixvim": "nixvim", "nur": "nur", - "plenary-nvim": "plenary-nvim", "rofi": "rofi", "rofi-nix": "rofi-nix", "stable": "stable", @@ -1129,11 +1112,11 @@ ] }, "locked": { - "lastModified": 1754328224, - "narHash": "sha256-glPK8DF329/dXtosV7YSzRlF4n35WDjaVwdOMEoEXHA=", + "lastModified": 1752544651, + "narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=", "owner": "Mic92", "repo": "sops-nix", - "rev": "49021900e69812ba7ddb9e40f9170218a7eca9f4", + "rev": "2c8def626f54708a9c38a5861866660395bb3461", "type": "github" }, "original": { @@ -1144,11 +1127,11 @@ }, "stable": { "locked": { - "lastModified": 1754689972, - "narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=", + "lastModified": 1753345091, + "narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a", + "rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9", "type": "github" }, "original": { @@ -1187,11 +1170,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1754597531, - "narHash": "sha256-OpC9/PBIuL2WEJUkcuD/wVxI8r+3o6f5RylSIefjHo4=", + "lastModified": 1753553562, + "narHash": "sha256-CpTwdsrPU3UFy95Btg56RcVMgNpnw3C0DYTznE5aRq4=", "owner": "nix-community", "repo": "stylix", - "rev": "63bb34a66ad7d1af2e95ee20dd675896b2074c32", + "rev": "af85565aba0f4749cb18b118a7333a0745920950", "type": "github" }, "original": { @@ -1303,11 +1286,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1750770351, - "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", + "lastModified": 1748180480, + "narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=", "owner": "tinted-theming", "repo": "schemes", - "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", + "rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31", "type": "github" }, "original": { @@ -1319,11 +1302,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1751159871, - "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", + "lastModified": 1748740859, + "narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", + "rev": "57d5f9683ff9a3b590643beeaf0364da819aedda", "type": "github" }, "original": { @@ -1335,11 +1318,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1751158968, - "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", + "lastModified": 1725758778, + "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", + "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", "type": "github" }, "original": { @@ -1355,11 +1338,11 @@ ] }, "locked": { - "lastModified": 1754492133, - "narHash": "sha256-B+3g9+76KlGe34Yk9za8AF3RL+lnbHXkLiVHLjYVOAc=", + "lastModified": 1753439394, + "narHash": "sha256-Bv9h1AJegLI8uAhiJ1sZ4XAndYxhgf38tMgCQwiEpmc=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "1298185c05a56bff66383a20be0b41a307f52228", + "rev": "2673921c03d6e75fdf4aa93e025772608d1482cf", "type": "github" }, "original": { @@ -1406,11 +1389,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1754533920, - "narHash": "sha256-fCZ68Yud1sUCq6UNXj0SDyiBgVA8gJUE+14ZFGsFJG8=", + "lastModified": 1752338000, + "narHash": "sha256-Fxlp/yKtynug0jyuauAmvZU2SzHCfwlwWf85j+IvQ0U=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "e0d1dad25a158551ab58547b2ece4b7d5a19929c", + "rev": "ba78881a68182ce338041846164cbfed0d70935c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c8eb338..12afb59 100644 --- a/flake.nix +++ b/flake.nix @@ -165,8 +165,6 @@ # 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 2206f5a..529ed06 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 mkIf mkPackageOption; + inherit (lib) mkEnableOption getExe mkIf mkPackageOption; in { imports = [ inputs.niri.nixosModules.niri @@ -64,7 +64,10 @@ in { enable = true; # start using systemd service - systemd.enable = true; + systemd = { + enable = true; + target = "niri.service"; + }; settings = { mainBar = { @@ -86,12 +89,8 @@ in { color = "000000"; }; }; - - wayland.systemd.target = "niri.service"; - - systemd.user.services.waybar.Unit.After = [ "graphical-session.target" ]; - systemd.user.services.swayidle.Unit.After = [ "graphical-session.target" ]; - + systemd.user.services.waybar.Unit.After = ["graphical-session.target"]; + systemd.user.services.swayidle.Unit.After = ["graphical-session.target"]; services.swayidle = { enable = true; events = [ @@ -116,14 +115,16 @@ in { command = "${pkgs.systemd}/bin/loginctl lock-session"; } ]; + systemdTarget = "niri.service"; }; services.dunst.enable = true; - services.kanshi.enable = true; - + services.kanshi = { + enable = true; + systemdTarget = "niri.service"; + }; 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"; @@ -201,6 +202,9 @@ 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; @@ -259,6 +263,23 @@ 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 f01fdd4..ae64e8b 100644 --- a/modules/moritz/programs/nvim/options.lua +++ b/modules/moritz/programs/nvim/options.lua @@ -25,7 +25,6 @@ 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 e7c2f55..836e995 100644 --- a/modules/moritz/programs/nvim/plugins/blink-cmp.nix +++ b/modules/moritz/programs/nvim/plugins/blink-cmp.nix @@ -1,13 +1,6 @@ -{ - 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 @@ -23,41 +16,16 @@ in { }; appearance.nerd_font_variant = "mono"; sources = { - 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; - }; + default = [ + "lsp" + "path" + "snippets" + "buffer" + "vimtex" + ]; + providers.vimtex = { + name = "vimtex"; + module = "blink.compat.source"; }; }; signature.enabled = true; diff --git a/modules/moritz/programs/nvim/plugins/flash.nix b/modules/moritz/programs/nvim/plugins/flash.nix deleted file mode 100644 index 91b70c4..0000000 --- a/modules/moritz/programs/nvim/plugins/flash.nix +++ /dev/null @@ -1,25 +0,0 @@ -_: { - 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 f0c5536..99f06f1 100644 --- a/modules/moritz/programs/nvim/plugins/keymaps.nix +++ b/modules/moritz/programs/nvim/plugins/keymaps.nix @@ -25,24 +25,6 @@ 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 deleted file mode 100644 index b65f840..0000000 --- a/modules/moritz/programs/nvim/plugins/lazydev.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - 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 5a62ae1..7cb5bc9 100644 --- a/modules/moritz/programs/nvim/plugins/lsp.nix +++ b/modules/moritz/programs/nvim/plugins/lsp.nix @@ -28,61 +28,37 @@ }, } ''; - 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.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 { }"; }; - lexical.enable = true; - lua_ls.enable = true; - nil_ls.enable = true; - nixd.enable = true; - nixd.extraOptions.settings.nixd = { - nixpkgs = { - expr = "import { }"; + options = { + nixos = { + expr = ''builtins.head (builtins.attrValues ((builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations).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''; - }; + "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 new file mode 100644 index 0000000..a93702b --- /dev/null +++ b/modules/moritz/programs/nvim/plugins/lspsaga.nix @@ -0,0 +1,40 @@ +{...}: { + 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 f26ef76..aee93f5 100644 --- a/modules/moritz/programs/nvim/plugins/oil.nix +++ b/modules/moritz/programs/nvim/plugins/oil.nix @@ -4,13 +4,5 @@ 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 560b65c..ae69da1 100644 --- a/modules/moritz/programs/nvim/plugins/telescope.nix +++ b/modules/moritz/programs/nvim/plugins/telescope.nix @@ -1,22 +1,5 @@ -{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"]; @@ -29,7 +12,6 @@ ''; } ]; - plugins = { telescope = { enable = true; @@ -52,7 +34,7 @@ }; "fl" = { action = "current_buffer_fuzzy_find"; - options.desc = "Find lines"; + options.desc = "Search lines"; }; "fg" = { action = "live_grep"; @@ -60,7 +42,7 @@ }; "fh" = { action = "help_tags"; - options.desc = "Find help tags"; + options.desc = "Help tags"; }; "fr" = { action = "oldfiles"; @@ -68,7 +50,7 @@ }; "fc" = { action = "commands"; - options.desc = "Find Commands"; + options.desc = "Commands"; }; }; };