From 8a7796d7e9ce2c074ab6739e10a35c445df25fed Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sun, 1 Feb 2026 22:31:12 +0100 Subject: [PATCH 01/20] assistant/codecompanion: fix diff options --- docs/manual/release-notes/rl-0.9.md | 6 ++++++ .../plugins/assistant/codecompanion/codecompanion-nvim.nix | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index e31a07e8..662f7aeb 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -25,6 +25,12 @@ - The `setupOpts.mappings` options were also removed. Use the built-in Neovim settings (nvf's {option}`vim.keymaps`) +[Snoweuph](https://github.com/snoweuph) + +- Fix `vim.assistant.codecompanion-nvim.setupOpts.display.diff.provider` to only + allow valid options. `default` is no longer valid. `inline` and `split` are + two new valid options. + ## Changelog {#sec-release-0-9-changelog} [taylrfnt](https://github.com/taylrfnt) diff --git a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix index 8e5ed4cc..27603ad7 100644 --- a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix +++ b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix @@ -59,8 +59,8 @@ in { }; provider = mkOption { - type = enum ["default" "mini_diff"]; - default = "default"; + type = enum ["inline" "split" "mini_diff"]; + default = "inline"; description = "The preferred kind of provider."; }; }; From a0de0646f68f44d9f0d812092af02173fbfdefa9 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Sun, 1 Feb 2026 16:38:45 -0500 Subject: [PATCH 02/20] npins: use mnw function --- flake.lock | 6 +- modules/wrapper/build/config.nix | 2 +- npins/sources.nix | 115 ------------------------------- 3 files changed, 4 insertions(+), 119 deletions(-) delete mode 100644 npins/sources.nix diff --git a/flake.lock b/flake.lock index 0a98f689..a7cdc255 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ }, "mnw": { "locked": { - "lastModified": 1768701608, - "narHash": "sha256-kSvWF3Xt2HW9hmV5V7i8PqeWJIBUKmuKoHhOgj3Znzs=", + "lastModified": 1769981889, + "narHash": "sha256-ndI7AxL/6auelkLHngdUGVImBiHkG8w2N2fOTKZKn4k=", "owner": "Gerg-L", "repo": "mnw", - "rev": "20d63a8a1ae400557c770052a46a9840e768926b", + "rev": "332fed8f43b77149c582f1782683d6aeee1f07cf", "type": "github" }, "original": { diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 907983ed..72af1071 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -9,7 +9,7 @@ inherit (lib.trivial) flip; inherit (builtins) filter isString hasAttr getAttr; - getPin = flip getAttr (pkgs.callPackages ../../../npins/sources.nix {}); + getPin = flip getAttr (inputs.mnw.lib.npinsToPluginsAttrs pkgs ../../../npins/sources.json); # Build a Vim plugin with the given name and arguments. buildPlug = attrs: let diff --git a/npins/sources.nix b/npins/sources.nix deleted file mode 100644 index 0b09e232..00000000 --- a/npins/sources.nix +++ /dev/null @@ -1,115 +0,0 @@ -{ - lib, - fetchurl, - fetchgit, - fetchzip, -}: -builtins.mapAttrs -( - name: spec: let - mayOverride = name: path: let - envVarName = "NPINS_OVERRIDE_${saneName}"; - saneName = builtins.concatStringsSep "_" ( - builtins.concatLists ( - builtins.filter (x: builtins.isList x && x != [""]) (builtins.split "([a-zA-Z0-9]*)" name) - ) - ); - ersatz = builtins.getEnv envVarName; - in - if ersatz == "" - then path - else - # this turns the string into an actual Nix path (for both absolute and - # relative paths) - builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( - if builtins.substring 0 1 ersatz == "/" - then /. + ersatz - else /. + builtins.getEnv "PWD" + "/${ersatz}" - ); - - path = - rec { - GitRelease = Git; - Channel = Tarball; - - Git = - if spec.url != null && !spec.submodules - then Tarball - else - fetchgit ( - let - repo = spec.repository; - url = - { - Git = repo.url; - GitHub = "https://github.com/${repo.owner}/${repo.repo}.git"; - GitLab = "${repo.server}/${repo.repo_path}.git"; - Forgejo = "${repo.server}/${repo.owner}/${repo.repo}.git"; - } - .${ - repo.type - } or (throw "Unrecognized repository type ${repo.type}"); - in { - name = let - matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; - appendShort = - if (builtins.match "[a-f0-9]*" spec.revision) != null - then "-${builtins.substring 0 7 spec.revision}" - else ""; - in "${ - if matched == null - then "source" - else builtins.head matched - }${appendShort}"; - inherit url; - - rev = spec.revision; - inherit (spec) hash; - fetchSubmodules = spec.submodules; - } - ); - - PyPi = fetchurl { - inherit (spec) url hash; - }; - - Tarball = fetchzip { - inherit (spec) url hash; - extension = "tar"; - }; - } - .${ - spec.type - } or (builtins.throw "Unknown source type ${spec.type}"); - - version = - if spec ? revision - then builtins.substring 0 8 spec.revision - else "0"; - in - spec - // { - name = "${name}-${version}"; - pname = name; - inherit version; - outPath = - ( - # Override logic won't do anything if we're in pure eval - if builtins ? currentSystem - then mayOverride name path - else path - ).overrideAttrs - { - pname = name; - name = "${name}-${version}"; - inherit version; - }; - } -) -( - let - json = lib.importJSON ./sources.json; - in - assert lib.assertMsg (json.version == 7) "Unsupported format version ${toString json.version} in sources.json. Try running `npins upgrade`"; - json.pins -) From 7db4da419e17f0a3791656450f5bc4aa585e88c9 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Tue, 3 Feb 2026 12:08:50 +0100 Subject: [PATCH 03/20] language/make: add treesitter, formatter and diagnostics support (#1380) --- configuration.nix | 1 + docs/manual/release-notes/rl-0.9.md | 2 + modules/plugins/languages/default.nix | 1 + modules/plugins/languages/make.nix | 93 +++++++++++++++++++++++++++ 4 files changed, 97 insertions(+) create mode 100644 modules/plugins/languages/make.nix diff --git a/configuration.nix b/configuration.nix index 958311b1..2602a811 100644 --- a/configuration.nix +++ b/configuration.nix @@ -92,6 +92,7 @@ isMaximal: { ruby.enable = false; fsharp.enable = false; just.enable = false; + make.enable = false; qml.enable = false; jinja.enable = false; tailwind.enable = false; diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 662f7aeb..735ef61d 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -172,6 +172,8 @@ - Added [`golangci-lint`](https://golangci-lint.run/) for more diagnostics. +- Added Makefile support via `languages.make`. + [vagahbond](https://github.com/vagahbond): [codewindow.nvim]: https://github.com/gorbit99/codewindow.nvim diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index 7cc5bda5..0986e1e1 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -52,6 +52,7 @@ in { ./yaml.nix ./ruby.nix ./just.nix + ./make.nix ./xml.nix # This is now a hard deprecation. diff --git a/modules/plugins/languages/make.nix b/modules/plugins/languages/make.nix new file mode 100644 index 00000000..f7780cd9 --- /dev/null +++ b/modules/plugins/languages/make.nix @@ -0,0 +1,93 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (builtins) attrNames; + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.meta) getExe; + inherit (lib.types) listOf enum; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.nvim.types) mkGrammarOption diagnostics; + inherit (lib.nvim.attrsets) mapListToAttrs; + + cfg = config.vim.languages.make; + + defaultFormat = ["bake"]; + formats = { + bake = { + command = "${pkgs.mbake}/bin/mbake"; + }; + }; + + defaultDiagnosticsProvider = ["checkmake"]; + diagnosticsProviders = { + checkmake = { + config = { + cmd = getExe pkgs.checkmake; + }; + }; + }; +in { + options.vim.languages.make = { + enable = mkEnableOption "Make support"; + + treesitter = { + enable = mkEnableOption "Make treesitter" // {default = config.vim.languages.enableTreesitter;}; + package = mkGrammarOption pkgs "make"; + }; + + format = { + enable = mkEnableOption "Make formatting" // {default = config.vim.languages.enableFormat;}; + type = mkOption { + description = "make formatter to use"; + type = listOf (enum (attrNames formats)); + default = defaultFormat; + }; + }; + + extraDiagnostics = { + enable = mkEnableOption "extra Make diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;}; + types = diagnostics { + langDesc = "Make"; + inherit diagnosticsProviders; + inherit defaultDiagnosticsProvider; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf cfg.treesitter.enable { + vim.treesitter = { + enable = true; + grammars = [cfg.treesitter.package]; + }; + }) + + (mkIf cfg.format.enable { + vim.formatter.conform-nvim = { + enable = true; + setupOpts = { + formatters_by_ft.make = cfg.format.type; + formatters = + mapListToAttrs (name: { + inherit name; + value = formats.${name}; + }) + cfg.format.type; + }; + }; + }) + + (mkIf cfg.extraDiagnostics.enable { + vim.diagnostics.nvim-lint = { + enable = true; + linters_by_ft.make = cfg.extraDiagnostics.types; + linters = + mkMerge (map (name: {${name} = diagnosticsProviders.${name}.config;}) + cfg.extraDiagnostics.types); + }; + }) + ]); +} From 92854bd0eaaa06914afba345741c372439b8e335 Mon Sep 17 00:00:00 2001 From: irobot Date: Tue, 3 Feb 2026 06:52:39 -0800 Subject: [PATCH 04/20] Keymap/extra options (#1384) * keymaps: fix unable to set noremap = false Currently setting `vim.keymaps.*.noremap = false` has no effect. Given that noremap is set by default, the only way to undo it is to use `remap = true`. This commit adds `remap` as an internal option, and derives its final value as the inverse of noremap. This way, setting `noremap` to `false` now behaves as expected. See https://neovim.io/doc/user/lua-guide.html#_creating-mappings * keymaps/config: fix formatting merge unnecessarily split attrset * keymaps/options: remove unnecessary option + tweak related release notes entry --- docs/manual/release-notes/rl-0.9.md | 5 +++++ modules/wrapper/rc/config.nix | 1 + 2 files changed, 6 insertions(+) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 735ef61d..651f9f4e 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -180,4 +180,9 @@ https://github.com/gorbit99/codewindow.nvim - Add [codewindow.nvim] plugin in `vim.assistant.codewindow` with `enable` and `setupOpts` +[irobot](https://github.com/irobot): + +- Fix non-functional `vim.keymaps.*.noremap`. Now, setting it to false is + equivalent to `:lua vim.keymap.set(..., { remap = true })` + diff --git a/modules/wrapper/rc/config.nix b/modules/wrapper/rc/config.nix index 77a62d58..50211d2e 100644 --- a/modules/wrapper/rc/config.nix +++ b/modules/wrapper/rc/config.nix @@ -39,6 +39,7 @@ in { getOpts = keymap: { inherit (keymap) desc silent nowait script expr unique noremap; + remap = !keymap.noremap; }; toLuaKeymap = bind: "vim.keymap.set(${toLuaObject bind.mode}, ${toLuaObject bind.key}, ${toLuaObject (getAction bind)}, ${toLuaObject (getOpts bind)})"; From 047e2fba128ce0a51fc7d8bb7220997d1dbdaa91 Mon Sep 17 00:00:00 2001 From: Joonas Rautiola Date: Wed, 4 Feb 2026 15:20:45 +0200 Subject: [PATCH 05/20] prettier-plugin-astro: update deprecated pnpm attributes --- flake/pkgs/by-name/prettier-plugin-astro/package.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flake/pkgs/by-name/prettier-plugin-astro/package.nix b/flake/pkgs/by-name/prettier-plugin-astro/package.nix index d893da7c..0c0d206f 100644 --- a/flake/pkgs/by-name/prettier-plugin-astro/package.nix +++ b/flake/pkgs/by-name/prettier-plugin-astro/package.nix @@ -3,6 +3,8 @@ fetchFromGitHub, nodejs, pnpm_9, + pnpmConfigHook, + fetchPnpmDeps, pins, }: let pin = pins.prettier-plugin-astro; @@ -17,7 +19,8 @@ in sha256 = pin.hash; }; - pnpmDeps = pnpm_9.fetchDeps { + pnpmDeps = fetchPnpmDeps { + pnpm = pnpm_9; inherit (finalAttrs) pname src; fetcherVersion = 2; hash = "sha256-K7pIWLkIIbUKDIcysfEtcf/eVMX9ZgyFHdqcuycHCNE="; @@ -25,7 +28,9 @@ in nativeBuildInputs = [ nodejs - pnpm_9.configHook + (pnpmConfigHook.overrideAttrs { + propagatedBuildInputs = [pnpm_9]; + }) ]; buildPhase = '' From 544c2c99eacfb7bfdee0fd31b4a88410bd4361c7 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sat, 7 Feb 2026 12:02:15 +0100 Subject: [PATCH 06/20] languages/php: add debugging (#1392) --- docs/manual/release-notes/rl-0.9.md | 2 ++ modules/plugins/languages/php.nix | 46 +++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 651f9f4e..4e237ea7 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -174,6 +174,8 @@ - Added Makefile support via `languages.make`. +- Added Debugging support to `languages.php`. + [vagahbond](https://github.com/vagahbond): [codewindow.nvim]: https://github.com/gorbit99/codewindow.nvim diff --git a/modules/plugins/languages/php.nix b/modules/plugins/languages/php.nix index 193c0a1f..dc859a4f 100644 --- a/modules/plugins/languages/php.nix +++ b/modules/plugins/languages/php.nix @@ -4,11 +4,12 @@ lib, ... }: let - inherit (builtins) attrNames; + inherit (builtins) attrNames toString toFile; inherit (lib.options) mkEnableOption mkOption; inherit (lib.meta) getExe; inherit (lib.modules) mkIf mkMerge; - inherit (lib.types) enum; + inherit (lib.types) enum int attrs; + inherit (lib.nvim.lua) toLuaObject; inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf; inherit (lib.nvim.attrsets) mapListToAttrs; inherit (lib.generators) mkLuaInline; @@ -82,6 +83,28 @@ in { description = "PHP LSP server to use"; }; }; + + dap = { + enable = mkEnableOption "Enable PHP Debug Adapter" // {default = config.vim.languages.enableDAP;}; + xdebug = { + adapter = mkOption { + type = attrs; + default = { + type = "executable"; + command = "${pkgs.nodePackages_latest.nodejs}/bin/node"; + args = [ + "${pkgs.vscode-extensions.xdebug.php-debug}/share/vscode/extensions/xdebug.php-debug/out/phpDebug.js" + ]; + }; + description = "XDebug adapter to use for nvim-dap"; + }; + port = mkOption { + type = int; + default = 9003; + description = "Port to use for XDebug"; + }; + }; + }; }; config = mkIf cfg.enable (mkMerge [ @@ -98,5 +121,24 @@ in { }) cfg.lsp.servers; }) + + (mkIf cfg.dap.enable { + vim = { + debugger.nvim-dap = { + enable = true; + sources.php-debugger = '' + dap.adapters.xdebug = ${toLuaObject cfg.dap.xdebug.adapter} + dap.configurations.php = { + { + type = 'xdebug', + request = 'launch', + name = 'Listen for XDebug', + port = ${toString cfg.dap.xdebug.port}, + }, + } + ''; + }; + }; + }) ]); } From ef5cf386c1e7243d86f775ee93b909119fb86783 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sun, 1 Feb 2026 22:51:21 +0100 Subject: [PATCH 07/20] fun/syntax-gaslighting: add plugin --- docs/manual/release-notes/rl-0.9.md | 4 +++ modules/plugins/visuals/default.nix | 1 + .../visuals/syntax-gaslighting/config.nix | 20 +++++++++++++ .../visuals/syntax-gaslighting/default.nix | 6 ++++ .../syntax-gaslighting/syntax-gaslighting.nix | 28 +++++++++++++++++++ npins/sources.json | 13 +++++++++ 6 files changed, 72 insertions(+) create mode 100644 modules/plugins/visuals/syntax-gaslighting/config.nix create mode 100644 modules/plugins/visuals/syntax-gaslighting/default.nix create mode 100644 modules/plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 4e237ea7..42a5c2f4 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -176,6 +176,10 @@ - Added Debugging support to `languages.php`. +- Didn't Add + [`syntax-gaslighting`](https://github.com/NotAShelf/syntax-gaslighting.nvim), + you're crazy. + [vagahbond](https://github.com/vagahbond): [codewindow.nvim]: https://github.com/gorbit99/codewindow.nvim diff --git a/modules/plugins/visuals/default.nix b/modules/plugins/visuals/default.nix index 3caf6e32..f989b878 100644 --- a/modules/plugins/visuals/default.nix +++ b/modules/plugins/visuals/default.nix @@ -18,5 +18,6 @@ in { ./nvim-web-devicons ./rainbow-delimiters ./tiny-devicons-auto-colors + ./syntax-gaslighting ]; } diff --git a/modules/plugins/visuals/syntax-gaslighting/config.nix b/modules/plugins/visuals/syntax-gaslighting/config.nix new file mode 100644 index 00000000..2f7ecd8d --- /dev/null +++ b/modules/plugins/visuals/syntax-gaslighting/config.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.fun.syntax-gaslighting; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["syntax-gaslighting"]; + pluginRC.colorful-menu-nvim = entryAnywhere '' + require("syntax-gaslighting").setup(${toLuaObject cfg.setupOpts}) + ''; + }; + }; +} diff --git a/modules/plugins/visuals/syntax-gaslighting/default.nix b/modules/plugins/visuals/syntax-gaslighting/default.nix new file mode 100644 index 00000000..bb0ad198 --- /dev/null +++ b/modules/plugins/visuals/syntax-gaslighting/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./syntax-gaslighting.nix + ./config.nix + ]; +} diff --git a/modules/plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix b/modules/plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix new file mode 100644 index 00000000..b7e9081b --- /dev/null +++ b/modules/plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix @@ -0,0 +1,28 @@ +{lib, ...}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) str nullOr listOf bool; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.fun = { + syntax-gaslighting = { + enable = mkEnableOption "Thats no even a real option, you're crazy."; + + setupOpts = mkPluginSetupOption "syntax-gaslighting" { + messages = mkOption { + type = nullOr (listOf str); + default = null; + description = "Custom messages for gaslighting."; + }; + + merge_messages = mkOption { + type = bool; + default = false; + description = '' + Merge user messages with the default ones. + If disabled, the messages table will override default messages. + ''; + }; + }; + }; + }; +} diff --git a/npins/sources.json b/npins/sources.json index d9d1f9cc..a5aa2d88 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -2528,6 +2528,19 @@ "url": "https://github.com/supermaven-inc/supermaven-nvim/archive/07d20fce48a5629686aefb0a7cd4b25e33947d50.tar.gz", "hash": "sha256-1z3WKIiikQqoweReUyK5O8MWSRN5y95qcxM6qzlKMME=" }, + "syntax-gaslighting": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "NotAShelf", + "repo": "syntax-gaslighting.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "4cee4c0550e82b31e07424e0c44379920d716d79", + "url": "https://github.com/NotAShelf/syntax-gaslighting.nvim/archive/4cee4c0550e82b31e07424e0c44379920d716d79.tar.gz", + "hash": "sha256-sRg6UlK4hQubxf3ycGnMLi+tNvX3zvKgnHYVuZgmvOc=" + }, "tabular": { "type": "Git", "repository": { From 8bdbbe33e86dcf23d173afd1b35f75cf2775bbc6 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sat, 7 Feb 2026 16:02:18 +0100 Subject: [PATCH 08/20] Correct gaslighting option locations --- modules/plugins/visuals/syntax-gaslighting/config.nix | 2 +- .../plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plugins/visuals/syntax-gaslighting/config.nix b/modules/plugins/visuals/syntax-gaslighting/config.nix index 2f7ecd8d..68bafde4 100644 --- a/modules/plugins/visuals/syntax-gaslighting/config.nix +++ b/modules/plugins/visuals/syntax-gaslighting/config.nix @@ -7,7 +7,7 @@ inherit (lib.nvim.dag) entryAnywhere; inherit (lib.nvim.lua) toLuaObject; - cfg = config.vim.fun.syntax-gaslighting; + cfg = config.vim.visuals.syntax-gaslighting; in { config = mkIf cfg.enable { vim = { diff --git a/modules/plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix b/modules/plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix index b7e9081b..1de37411 100644 --- a/modules/plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix +++ b/modules/plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix @@ -3,7 +3,7 @@ inherit (lib.types) str nullOr listOf bool; inherit (lib.nvim.types) mkPluginSetupOption; in { - options.vim.fun = { + options.vim.visuals = { syntax-gaslighting = { enable = mkEnableOption "Thats no even a real option, you're crazy."; From 7a2c7c23966122eac80620dd503bf2b1163ed6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=B3sz=C3=B3=20Attila?= <5616737+Kazimazi@users.noreply.github.com> Date: Sun, 8 Feb 2026 18:49:27 +0100 Subject: [PATCH 09/20] feat/add grug far (#1406) * utility/grug-far-nvim: add new plugin * docs: add release note * chore: add to maximal config * style: nix formatter run --- configuration.nix | 1 + docs/manual/release-notes/rl-0.9.md | 5 +++++ modules/plugins/utility/default.nix | 1 + .../plugins/utility/grug-far-nvim/config.nix | 21 +++++++++++++++++++ .../plugins/utility/grug-far-nvim/default.nix | 6 ++++++ .../utility/grug-far-nvim/grug-far-nvim.nix | 9 ++++++++ npins/sources.json | 13 ++++++++++++ 7 files changed, 56 insertions(+) create mode 100644 modules/plugins/utility/grug-far-nvim/config.nix create mode 100644 modules/plugins/utility/grug-far-nvim/default.nix create mode 100644 modules/plugins/utility/grug-far-nvim/grug-far-nvim.nix diff --git a/configuration.nix b/configuration.nix index 2602a811..13d3cf5d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -205,6 +205,7 @@ isMaximal: { smart-splits.enable = isMaximal; undotree.enable = isMaximal; nvim-biscuits.enable = isMaximal; + grug-far-nvim.enable = isMaximal; motion = { hop.enable = true; diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 42a5c2f4..e5687d1a 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -191,4 +191,9 @@ https://github.com/gorbit99/codewindow.nvim - Fix non-functional `vim.keymaps.*.noremap`. Now, setting it to false is equivalent to `:lua vim.keymap.set(..., { remap = true })` +[kazimazi](https://github.com/kazimazi): + +- Added [`grug-far.nvim`](https://github.com/MagicDuck/grug-far.nvim) the find + and replace tool for neovim. + diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 2e00e270..ab116483 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -9,6 +9,7 @@ ./harpoon ./icon-picker ./images + ./grug-far-nvim ./leetcode-nvim ./mkdir ./motion diff --git a/modules/plugins/utility/grug-far-nvim/config.nix b/modules/plugins/utility/grug-far-nvim/config.nix new file mode 100644 index 00000000..9859c7db --- /dev/null +++ b/modules/plugins/utility/grug-far-nvim/config.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.utility.grug-far-nvim; +in { + config = { + vim.lazy.plugins.grug-far-nvim = mkIf cfg.enable { + package = "grug-far-nvim"; + cmd = [ + "GrugFar" + "GrugFarWithin" + ]; + setupModule = "grug-far"; + setupOpts = cfg.setupOpts; + }; + }; +} diff --git a/modules/plugins/utility/grug-far-nvim/default.nix b/modules/plugins/utility/grug-far-nvim/default.nix new file mode 100644 index 00000000..80a10a27 --- /dev/null +++ b/modules/plugins/utility/grug-far-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./grug-far-nvim.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/grug-far-nvim/grug-far-nvim.nix b/modules/plugins/utility/grug-far-nvim/grug-far-nvim.nix new file mode 100644 index 00000000..4795832e --- /dev/null +++ b/modules/plugins/utility/grug-far-nvim/grug-far-nvim.nix @@ -0,0 +1,9 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.utility.grug-far-nvim = { + enable = mkEnableOption "grug-far"; + setupOpts = mkPluginSetupOption "grug-far" {}; + }; +} diff --git a/npins/sources.json b/npins/sources.json index a5aa2d88..d1e16e61 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -643,6 +643,19 @@ "url": "https://github.com/ellisonleao/glow.nvim/archive/5d5954b2f22e109d4a6eba8b2618c5b96e4ee7a2.tar.gz", "hash": "sha256-CvBcmVWBgI+m+PS7p7PmsiPtTEfqx2kpIzz4mImONIc=" }, + "grug-far-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "MagicDuck", + "repo": "grug-far.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "275dbedc96e61a6b8d1dfb28ba51586ddd233dcf", + "url": "https://github.com/MagicDuck/grug-far.nvim/archive/275dbedc96e61a6b8d1dfb28ba51586ddd233dcf.tar.gz", + "hash": "sha256-qn1BTNCX0Sm158Lv5JfHThqlJX9ualCIlc+RCjWa+t8=" + }, "gruvbox": { "type": "Git", "repository": { From 98780ec92dc18930a1df3eee2874e6bc19c83234 Mon Sep 17 00:00:00 2001 From: Ladas552 Date: Tue, 10 Feb 2026 10:13:56 +0500 Subject: [PATCH 10/20] wrapper/options: change `withRuby` to `false` by default --- docs/manual/release-notes/rl-0.9.md | 4 ++++ modules/wrapper/environment/options.nix | 13 +++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index e5687d1a..967609dc 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -196,4 +196,8 @@ https://github.com/gorbit99/codewindow.nvim - Added [`grug-far.nvim`](https://github.com/MagicDuck/grug-far.nvim) the find and replace tool for neovim. +[Ladas552](https://github.com/Ladas552) + +- Changed `withRuby` to not be enabled by default + diff --git a/modules/wrapper/environment/options.nix b/modules/wrapper/environment/options.nix index 5b2f1f63..fdc07053 100644 --- a/modules/wrapper/environment/options.nix +++ b/modules/wrapper/environment/options.nix @@ -106,16 +106,9 @@ in { ''; }; - # This defaults to `true` in the wrapper - # and since we pass this value to the wrapper - # with an inherit, it should be `true` here as well - withRuby = - mkEnableOption '' - Ruby support in the Neovim wrapper. - '' - // { - default = true; - }; + withRuby = mkEnableOption '' + Ruby support in the Neovim wrapper + ''; withNodeJs = mkEnableOption '' NodeJS support in the Neovim wrapper From bd265fee7e9655e2898e6f6b76267eb832b0f3c9 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Wed, 11 Feb 2026 13:34:16 +0100 Subject: [PATCH 11/20] languages/php: add formatting (#1401) --- docs/manual/release-notes/rl-0.9.md | 3 ++ modules/plugins/languages/php.nix | 44 +++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 967609dc..2ff72acd 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -176,6 +176,9 @@ - Added Debugging support to `languages.php`. +- Added Formatting support to `languages.php` via + [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer). + - Didn't Add [`syntax-gaslighting`](https://github.com/NotAShelf/syntax-gaslighting.nvim), you're crazy. diff --git a/modules/plugins/languages/php.nix b/modules/plugins/languages/php.nix index dc859a4f..8d2af124 100644 --- a/modules/plugins/languages/php.nix +++ b/modules/plugins/languages/php.nix @@ -4,11 +4,11 @@ lib, ... }: let - inherit (builtins) attrNames toString toFile; + inherit (builtins) attrNames toString; inherit (lib.options) mkEnableOption mkOption; inherit (lib.meta) getExe; inherit (lib.modules) mkIf mkMerge; - inherit (lib.types) enum int attrs; + inherit (lib.types) enum int attrs listOf; inherit (lib.nvim.lua) toLuaObject; inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf; inherit (lib.nvim.attrsets) mapListToAttrs; @@ -65,6 +65,21 @@ root_markers = ["composer.json" ".git"]; }; }; + + defaultFormat = ["php_cs_fixer"]; + formats = { + php_cs_fixer = { + /* + Using 8.4 instead of 8.5 because of compatibility: + ```logs + 2026-02-08 00:42:23[ERROR] Formatter 'php_cs_fixer' error: PHP CS Fixer 3.87.2 + PHP runtime: 8.5.2 + PHP CS Fixer currently supports PHP syntax only up to PHP 8.4, current PHP version: 8.5.2. + ``` + */ + command = "${pkgs.php84Packages.php-cs-fixer}/bin/php-cs-fixer"; + }; + }; in { options.vim.languages.php = { enable = mkEnableOption "PHP language support"; @@ -84,6 +99,16 @@ in { }; }; + format = { + enable = mkEnableOption "PHP formatting" // {default = config.vim.languages.enableFormat;}; + + type = mkOption { + description = "PHP formatter to use"; + type = listOf (enum (attrNames formats)); + default = defaultFormat; + }; + }; + dap = { enable = mkEnableOption "Enable PHP Debug Adapter" // {default = config.vim.languages.enableDAP;}; xdebug = { @@ -122,6 +147,21 @@ in { cfg.lsp.servers; }) + (mkIf cfg.format.enable { + vim.formatter.conform-nvim = { + enable = true; + setupOpts = { + formatters_by_ft.php = cfg.format.type; + formatters = + mapListToAttrs (name: { + inherit name; + value = formats.${name}; + }) + cfg.format.type; + }; + }; + }) + (mkIf cfg.dap.enable { vim = { debugger.nvim-dap = { From aff5214a94133a7a6d3680ac9dc56ff6580a8672 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 14 Feb 2026 11:45:11 +0300 Subject: [PATCH 12/20] blink-cmp: 1.8.0 -> 1.9.1 Signed-off-by: NotAShelf Change-Id: Ie60428e7c72378c68a42f907ce5015ff6a6a6964 --- flake/pkgs/by-name/blink-cmp/package.nix | 15 ++++++++-- .../blink-cmp/patches/0001-pin-frizbee.patch | 29 +++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 flake/pkgs/by-name/blink-cmp/patches/0001-pin-frizbee.patch diff --git a/flake/pkgs/by-name/blink-cmp/package.nix b/flake/pkgs/by-name/blink-cmp/package.nix index 7c6371d1..df55de22 100644 --- a/flake/pkgs/by-name/blink-cmp/package.nix +++ b/flake/pkgs/by-name/blink-cmp/package.nix @@ -3,17 +3,18 @@ stdenv, rustPlatform, fetchFromGitHub, + rust-jemalloc-sys, writeShellScriptBin, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "blink-cmp"; - version = "1.8.0"; + version = "1.9.1"; src = fetchFromGitHub { owner = "Saghen"; repo = "blink.cmp"; tag = "v${finalAttrs.version}"; - hash = "sha256-JjlcPj7v9J+v1SDBYIub6jFEslLhZGHmsipV1atUAFo="; + hash = "sha256-GgodXdWpQoF2z1g1/WvnSpfuhskw0aMcOoyZM5l66q8="; }; forceShare = [ @@ -31,6 +32,16 @@ rustPlatform.buildRustPackage (finalAttrs: { mv "$out/lib" "$out/target/release" ''; + # From the blink.cmp flake + buildInputs = lib.optionals stdenv.hostPlatform.isAarch64 [rust-jemalloc-sys]; + + # NOTE: The only change in frizbee 0.7.0 was nixpkgs incompatible rust semantic changes + # Patch just reverts https://github.com/saghen/blink.cmp/commit/cc824ec85b789a54d05241389993c6ab8c040810 + # Taken from Nixpkgs' blink.cmp derivation, available under the MIT license + cargoPatches = [ + ./patches/0001-pin-frizbee.patch + ]; + cargoHash = "sha256-Qdt8O7IGj2HySb1jxsv3m33ZxJg96Ckw26oTEEyQjfs="; nativeBuildInputs = [ diff --git a/flake/pkgs/by-name/blink-cmp/patches/0001-pin-frizbee.patch b/flake/pkgs/by-name/blink-cmp/patches/0001-pin-frizbee.patch new file mode 100644 index 00000000..cc7defc9 --- /dev/null +++ b/flake/pkgs/by-name/blink-cmp/patches/0001-pin-frizbee.patch @@ -0,0 +1,29 @@ +diff --git a/Cargo.lock b/Cargo.lock +index 35bb10e..71c79eb 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -144,9 +144,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + + [[package]] + name = "frizbee" +-version = "0.7.0" ++version = "0.6.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "4d024031f1a5bc5f19917baa0b618f1067610e35ba23e9f105653fcb27e74f5c" ++checksum = "c3365720de81dac18e889afa72f5907aa061c975548da68e2400c056ebc94aec" + dependencies = [ + "multiversion", + "rayon", +diff --git a/Cargo.toml b/Cargo.toml +index 392d1bb..c776c7d 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -9,7 +9,7 @@ crate-type = ["cdylib"] + + [dependencies] + regex = "1.11.2" +-frizbee = "0.7.0" ++frizbee = "0.6.0" + mlua = { version = "0.11.3", features = ["module", "luajit"] } + thiserror = "2.0.16" + blake3 = "1.8.2" From 325eae4a7570340185be8ff481ba52ef46546812 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 14 Feb 2026 22:39:05 +0300 Subject: [PATCH 13/20] visuals/nvim-web-devicons: bump version; lazyload on `DeferredUIEnter` Signed-off-by: NotAShelf Change-Id: I61177a580ef1be42f9129a19efd8fad26a6a6964 --- .../visuals/nvim-web-devicons/config.nix | 11 ++++---- .../nvim-web-devicons/nvim-web-devicons.nix | 28 +++++++++---------- npins/sources.json | 6 ++-- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/modules/plugins/visuals/nvim-web-devicons/config.nix b/modules/plugins/visuals/nvim-web-devicons/config.nix index 9c8e9418..f5293a06 100644 --- a/modules/plugins/visuals/nvim-web-devicons/config.nix +++ b/modules/plugins/visuals/nvim-web-devicons/config.nix @@ -4,8 +4,6 @@ ... }: let inherit (lib.modules) mkIf; - inherit (lib.nvim.lua) toLuaObject; - inherit (lib.nvim.dag) entryAnywhere; cfg = config.vim.visuals.nvim-web-devicons; in { @@ -13,9 +11,12 @@ in { vim = { startPlugins = ["nvim-web-devicons"]; - pluginRC.nvim-web-devicons = entryAnywhere '' - require("nvim-web-devicons").setup(${toLuaObject cfg.setupOpts}) - ''; + vim.lazy.plugins.icon-picker-nvim = { + package = "nvim-web-devicons"; + setupModule = "nvim-web-deviconsr"; + event = ["DeferredUIEnter"]; + inherit (cfg) setupOpts; + }; }; }; } diff --git a/modules/plugins/visuals/nvim-web-devicons/nvim-web-devicons.nix b/modules/plugins/visuals/nvim-web-devicons/nvim-web-devicons.nix index 6ff22614..b54ddcd5 100644 --- a/modules/plugins/visuals/nvim-web-devicons/nvim-web-devicons.nix +++ b/modules/plugins/visuals/nvim-web-devicons/nvim-web-devicons.nix @@ -1,6 +1,6 @@ {lib, ...}: let inherit (lib.modules) mkRenamedOptionModule; - inherit (lib.options) mkOption mkEnableOption literalExpression; + inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) nullOr attrsOf attrs enum; inherit (lib.nvim.types) mkPluginSetupOption; in { @@ -16,27 +16,27 @@ in { variant = mkOption { type = nullOr (enum ["light" "dark"]); default = null; - description = "Set the light or dark variant manually, instead of relying on `background`"; + description = '' + Set the light or dark variant manually, instead of relying on `background` + ''; }; override = mkOption { type = attrsOf attrs; default = {}; - example = literalExpression '' - { - zsh = { - name = "Zsh"; - icon = ""; - color = "#428850"; - cterm_color = "65"; - }; - } - ''; + example = { + zsh = { + name = "Zsh"; + icon = ""; + color = "#428850"; + cterm_color = "65"; + }; + }; description = '' Your personal icon overrides. - You can specify color or cterm_color instead of specifying - both of them. DevIcon will be appended to `name` + You can specify color or `cterm_color` instead of specifying both of + them. `DevIcon` will be appended to `name` ''; }; }; diff --git a/npins/sources.json b/npins/sources.json index d1e16e61..f07d0d70 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -2129,9 +2129,9 @@ }, "branch": "master", "submodules": false, - "revision": "b8221e42cf7287c4dcde81f232f58d7b947c210d", - "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/b8221e42cf7287c4dcde81f232f58d7b947c210d.tar.gz", - "hash": "sha256-lVrakFrpIP9lp7sMfMb33KeMPIkcn1qBFVytJzKCfuE=" + "revision": "746ffbb17975ebd6c40142362eee1b0249969c5c", + "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/746ffbb17975ebd6c40142362eee1b0249969c5c.tar.gz", + "hash": "sha256-jXWBPcfLwSkWQ/eRbxVDWC7kFOODSsCRmzC3rHKQLhQ=" }, "obsidian-nvim": { "type": "GitRelease", From 26edb440af696b962bf949106c737c89e9c8d4f4 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 14 Feb 2026 22:40:38 +0300 Subject: [PATCH 14/20] visuals/nvim-web-devicons: fix typo in setup module Signed-off-by: NotAShelf Change-Id: Id44003d474e53846aa9b666d4f89ed456a6a6964 --- modules/plugins/visuals/nvim-web-devicons/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/visuals/nvim-web-devicons/config.nix b/modules/plugins/visuals/nvim-web-devicons/config.nix index f5293a06..8892f24d 100644 --- a/modules/plugins/visuals/nvim-web-devicons/config.nix +++ b/modules/plugins/visuals/nvim-web-devicons/config.nix @@ -13,7 +13,7 @@ in { vim.lazy.plugins.icon-picker-nvim = { package = "nvim-web-devicons"; - setupModule = "nvim-web-deviconsr"; + setupModule = "nvim-web-devicons"; event = ["DeferredUIEnter"]; inherit (cfg) setupOpts; }; From a81aa0f69194aca8fa420c2f0846b343b689d0fe Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 14 Feb 2026 22:41:10 +0300 Subject: [PATCH 15/20] ui/noice: lazyload on `DeferredUIEnter` Signed-off-by: NotAShelf Change-Id: Icbff8af3a0fc527f399530718e2ef7cc6a6a6964 --- modules/plugins/ui/noice/config.nix | 17 +++++++---------- .../visuals/nvim-web-devicons/config.nix | 4 +--- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/modules/plugins/ui/noice/config.nix b/modules/plugins/ui/noice/config.nix index 1f81f4a9..e4721b66 100644 --- a/modules/plugins/ui/noice/config.nix +++ b/modules/plugins/ui/noice/config.nix @@ -6,8 +6,6 @@ }: let inherit (lib.modules) mkIf; inherit (lib.lists) optionals; - inherit (lib.nvim.lua) toLuaObject; - inherit (lib.nvim.dag) entryAnywhere; cfg = config.vim.ui.noice; tscfg = config.vim.treesitter; @@ -16,16 +14,15 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = [ - "noice-nvim" - "nui-nvim" - ]; - + startPlugins = ["nui-nvim"]; treesitter.grammars = optionals tscfg.addDefaultGrammars defaultGrammars; - pluginRC.noice-nvim = entryAnywhere '' - require("noice").setup(${toLuaObject cfg.setupOpts}) - ''; + lazy.plugins.noice-nvim = { + package = "noice-nvim"; + setupModule = "noice"; + event = ["DeferredUIEnter"]; + inherit (cfg) setupOpts; + }; }; }; } diff --git a/modules/plugins/visuals/nvim-web-devicons/config.nix b/modules/plugins/visuals/nvim-web-devicons/config.nix index 8892f24d..8d1ad1d3 100644 --- a/modules/plugins/visuals/nvim-web-devicons/config.nix +++ b/modules/plugins/visuals/nvim-web-devicons/config.nix @@ -9,9 +9,7 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = ["nvim-web-devicons"]; - - vim.lazy.plugins.icon-picker-nvim = { + lazy.plugins.icon-picker-nvim = { package = "nvim-web-devicons"; setupModule = "nvim-web-devicons"; event = ["DeferredUIEnter"]; From ba22aa662aaa8b2ce359e9de8ccfab1d160015c1 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 14 Feb 2026 22:53:19 +0300 Subject: [PATCH 16/20] docs: update release notes Signed-off-by: NotAShelf Change-Id: Ica9796a881a3866abc4e50fc3cfe7f106a6a6964 --- docs/manual/release-notes/rl-0.9.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 2ff72acd..b427840c 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -56,6 +56,10 @@ treesitter grammars were changed to prefer `grammarPlugins` over `builtGrammars`. +[NotAShelf](https://github.com/notashelf): + +- Lazyload noice.nvim and nvim-web-devicons on `DeferredUIEnter` + [jfeo](https://github.com/jfeo): [ccc.nvim]: https://github.com/uga-rosa/ccc.nvim From a315c01ff035276b5096f5fe7a960d0668cf5f46 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 14 Feb 2026 22:56:59 +0300 Subject: [PATCH 17/20] visuals/nvim-web-devicons: fix lazy-loaded module name Signed-off-by: NotAShelf Change-Id: I74a6143d8d667410e20759114f3bfbc86a6a6964 --- modules/plugins/visuals/nvim-web-devicons/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/visuals/nvim-web-devicons/config.nix b/modules/plugins/visuals/nvim-web-devicons/config.nix index 8d1ad1d3..98f54e34 100644 --- a/modules/plugins/visuals/nvim-web-devicons/config.nix +++ b/modules/plugins/visuals/nvim-web-devicons/config.nix @@ -9,7 +9,7 @@ in { config = mkIf cfg.enable { vim = { - lazy.plugins.icon-picker-nvim = { + lazy.plugins.nvim-web-devicons = { package = "nvim-web-devicons"; setupModule = "nvim-web-devicons"; event = ["DeferredUIEnter"]; From 14cf7fc9b835b082df4a27a3b58d1d432b39cd33 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 14 Feb 2026 23:21:17 +0300 Subject: [PATCH 18/20] flake: bump inputs Signed-off-by: NotAShelf Change-Id: Iec6c56db62cc6852e6b9c1de023aa45b6a6a6964 --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index a7cdc255..4ebfffc3 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1768135262, - "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "mnw": { "locked": { - "lastModified": 1769981889, - "narHash": "sha256-ndI7AxL/6auelkLHngdUGVImBiHkG8w2N2fOTKZKn4k=", + "lastModified": 1770419553, + "narHash": "sha256-b1XqsH7AtVf2dXmq2iyRr2NC1yG7skY7Z6N2MpWHlK4=", "owner": "Gerg-L", "repo": "mnw", - "rev": "332fed8f43b77149c582f1782683d6aeee1f07cf", + "rev": "2aaffa8030d0b262176146adbb6b0e6374ce2957", "type": "github" }, "original": { @@ -74,11 +74,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", + "lastModified": 1771008912, + "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "rev": "a82ccc39b39b621151d6732718e3e250109076fa", "type": "github" }, "original": { From c52a2641d294fad01f1e115575a5b2a802a0e32f Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 27 Jan 2026 12:13:25 +0300 Subject: [PATCH 19/20] neovim/init: add module option for registering custom filetypes Signed-off-by: NotAShelf Change-Id: I5f5f576642884c09a8e4afc18499ed606a6a6964 --- modules/neovim/init/default.nix | 1 + modules/neovim/init/filetype.nix | 123 +++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 modules/neovim/init/filetype.nix diff --git a/modules/neovim/init/default.nix b/modules/neovim/init/default.nix index 3f195085..641cc0e1 100644 --- a/modules/neovim/init/default.nix +++ b/modules/neovim/init/default.nix @@ -5,6 +5,7 @@ ./clipboard.nix ./debug.nix ./diagnostics.nix + ./filetype.nix ./highlight.nix ./lsp.nix ./spellcheck.nix diff --git a/modules/neovim/init/filetype.nix b/modules/neovim/init/filetype.nix new file mode 100644 index 00000000..1aab6721 --- /dev/null +++ b/modules/neovim/init/filetype.nix @@ -0,0 +1,123 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkOption; + inherit (lib.types) nullOr either oneOf attrsOf str listOf submodule ints; + inherit (lib.nvim.types) luaInline; + inherit (lib.nvim.dag) entryBefore; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim; + + # vim.filetype.add() is quite robust, but this makes for a very + # complex type that we have to handle. It takes a string, a Lua function + # or a dictionary with the priority of the extension. + ftOptionType = attrsOf (oneOf [ + str # "filetype" + luaInline # `function(path, bufnr) ... end` + + # { 'dosini', { priority = 10 } }, + (listOf (either (either str luaInline) (submodule (submodule { + options = { + priority = mkOption { + type = ints.unsigned; + description = '' + `vim.filetype.add()` can take an optional priority value to resolve + conflicts where a filetype is registered by multiple patterns. When + priority is specified, file with the higher priority value will be + matched first on conflict. + ''; + }; + }; + })))) + ]); +in { + options.vim.filetype = mkOption { + type = submodule { + options = { + extension = mkOption { + type = nullOr ftOptionType; + default = null; + description = "register a new filetype by extension"; + }; + + filename = mkOption { + type = nullOr ftOptionType; + default = null; + description = "register a new filetype by file name"; + }; + + pattern = mkOption { + type = nullOr ftOptionType; + default = null; + description = "register a new filetype by pattern"; + }; + }; + }; + + default = {}; + example = { + filename = { + ".foorc" = "toml"; + "/etc/foo/config" = "toml"; + "todo.txt" = "todotxt"; + }; + + pattern = { + ".*%.scm" = "query"; + ".*README.(%a+)" = '' + function(path, bufnr, ext) + if ext == 'md' then + return 'markdown' + elseif ext == 'rst' then + return 'rst' + end + end, + ''; + }; + + extension = { + mdx = "markdown"; + bar = lib.generators.mkLuaInline '' + { + bar = function(path, bufnr) + if some_condition() then + return 'barscript', function(bufnr) + -- Set a buffer variable + vim.b[bufnr].barscript_version = 2 + end + end + return 'bar' + end, + } + ''; + }; + }; + + description = '' + Additional filetypes to be registered through `vim.filetype.add()` + + Filetype mappings can be added either by extension or by filename. The + key can be either the "tail" or the full file path. The full file path + is checked first, followed by the file name. If a match is not found + using the filename, then the filename is matched against the list of + Lua patterns (sorted by priority) until a match is found. + + If a pattern matching does not find a filetype, then the file extension + is used. + + See `:h vim.filetype.add()` for more details. + ''; + }; + + config = { + # XXX: some plugins can be loaded on filetype, and unless the filetypes + # are registered first, chances are custom filetypes will not be usable + # for lazy-loading on ft. + vim.luaConfigRC.filetype = entryBefore ["lazyConfigs"] '' + vim.filetype.add(${toLuaObject cfg.filetype}) + ''; + }; +} From 1966bd2586cc5892b87e088d3864bd4387cb4ee8 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 27 Jan 2026 12:54:02 +0300 Subject: [PATCH 20/20] modules: move mappings to `neovim/init` Signed-off-by: NotAShelf Change-Id: I9b04107496df27dcda1a24ce000da3f46a6a6964 --- modules/modules.nix | 1 - modules/neovim/init/default.nix | 1 + .../options.nix => init/mappings.nix} | 55 ++++++++++++++++++- modules/neovim/mappings/config.nix | 27 --------- modules/neovim/mappings/default.nix | 6 -- 5 files changed, 54 insertions(+), 36 deletions(-) rename modules/neovim/{mappings/options.nix => init/mappings.nix} (74%) delete mode 100644 modules/neovim/mappings/default.nix diff --git a/modules/modules.nix b/modules/modules.nix index 1eca042a..9c3bba1f 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -10,7 +10,6 @@ # such as spellchecking, mappings, and the init script (init.vim). neovim = map (p: ./neovim + "/${p}") [ "init" - "mappings" ]; # Individual plugin modules, separated by the type of plugin. diff --git a/modules/neovim/init/default.nix b/modules/neovim/init/default.nix index 641cc0e1..e831fab6 100644 --- a/modules/neovim/init/default.nix +++ b/modules/neovim/init/default.nix @@ -8,6 +8,7 @@ ./filetype.nix ./highlight.nix ./lsp.nix + ./mappings.nix ./spellcheck.nix ./util.nix ]; diff --git a/modules/neovim/mappings/options.nix b/modules/neovim/init/mappings.nix similarity index 74% rename from modules/neovim/mappings/options.nix rename to modules/neovim/init/mappings.nix index 98e04a65..54db0768 100644 --- a/modules/neovim/mappings/options.nix +++ b/modules/neovim/init/mappings.nix @@ -1,19 +1,31 @@ -{lib, ...}: let +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkMerge; inherit (lib.options) mkOption literalMD; inherit (lib.types) either str listOf attrsOf nullOr submodule; + inherit (lib.attrsets) mapAttrsToList; + inherit (lib.lists) flatten; + inherit (lib.trivial) pipe; inherit (lib.nvim.config) mkBool; mapConfigOptions = { desc = mkOption { type = nullOr str; default = null; - description = "A description of this keybind, to be shown in which-key, if you have it enabled."; + description = '' + Description for the keybind, to be shown in which-key, if you have enabled + in the module system. + ''; }; action = mkOption { type = str; description = "The command to execute."; }; + lua = mkBool false '' If true, `action` is considered to be lua code. Thus, it will not be wrapped in `""`. @@ -55,6 +67,22 @@ }); default = {}; }; + + legacyMapModes = { + normal = ["n"]; + insert = ["i"]; + select = ["s"]; + visual = ["v"]; + terminal = ["t"]; + normalVisualOp = ["n" "v" "o"]; + visualOnly = ["n" "x"]; + operator = ["o"]; + insertCommand = ["i" "c"]; + lang = ["l"]; + command = ["c"]; + }; + + cfg = config.vim; in { options.vim = { keymaps = mkOption { @@ -94,4 +122,27 @@ in { command = legacyMapOption "command-line"; }; }; + + config = { + vim.keymaps = mkMerge [ + ( + pipe cfg.maps + [ + (mapAttrsToList ( + oldMode: keybinds: + mapAttrsToList ( + key: bind: + bind + // { + inherit key; + mode = legacyMapModes.${oldMode}; + } + ) + keybinds + )) + flatten + ] + ) + ]; + }; } diff --git a/modules/neovim/mappings/config.nix b/modules/neovim/mappings/config.nix index a62a6ca2..11ddb0fd 100644 --- a/modules/neovim/mappings/config.nix +++ b/modules/neovim/mappings/config.nix @@ -3,11 +3,6 @@ lib, ... }: let - inherit (lib.modules) mkMerge; - inherit (lib.trivial) pipe; - inherit (lib.attrsets) mapAttrsToList; - inherit (lib.lists) flatten; - legacyMapModes = { normal = ["n"]; insert = ["i"]; @@ -24,26 +19,4 @@ cfg = config.vim; in { - config = { - vim.keymaps = mkMerge [ - ( - pipe cfg.maps - [ - (mapAttrsToList ( - oldMode: keybinds: - mapAttrsToList ( - key: bind: - bind - // { - inherit key; - mode = legacyMapModes.${oldMode}; - } - ) - keybinds - )) - flatten - ] - ) - ]; - }; } diff --git a/modules/neovim/mappings/default.nix b/modules/neovim/mappings/default.nix deleted file mode 100644 index fe9e1b8e..00000000 --- a/modules/neovim/mappings/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./config.nix - ./options.nix - ]; -}