diff --git a/configuration.nix b/configuration.nix index 13d3cf5d..958311b1 100644 --- a/configuration.nix +++ b/configuration.nix @@ -92,7 +92,6 @@ isMaximal: { ruby.enable = false; fsharp.enable = false; just.enable = false; - make.enable = false; qml.enable = false; jinja.enable = false; tailwind.enable = false; @@ -205,7 +204,6 @@ 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 b427840c..e31a07e8 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -25,12 +25,6 @@ - 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) @@ -56,10 +50,6 @@ 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 @@ -176,35 +166,10 @@ - Added [`golangci-lint`](https://golangci-lint.run/) for more diagnostics. -- Added Makefile support via `languages.make`. - -- 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. - [vagahbond](https://github.com/vagahbond): [codewindow.nvim]: 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 })` - -[kazimazi](https://github.com/kazimazi): - -- 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/flake.lock b/flake.lock index 4ebfffc3..0a98f689 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1769996383, - "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "lastModified": 1768135262, + "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "mnw": { "locked": { - "lastModified": 1770419553, - "narHash": "sha256-b1XqsH7AtVf2dXmq2iyRr2NC1yG7skY7Z6N2MpWHlK4=", + "lastModified": 1768701608, + "narHash": "sha256-kSvWF3Xt2HW9hmV5V7i8PqeWJIBUKmuKoHhOgj3Znzs=", "owner": "Gerg-L", "repo": "mnw", - "rev": "2aaffa8030d0b262176146adbb6b0e6374ce2957", + "rev": "20d63a8a1ae400557c770052a46a9840e768926b", "type": "github" }, "original": { @@ -74,11 +74,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1771008912, - "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a82ccc39b39b621151d6732718e3e250109076fa", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", "type": "github" }, "original": { diff --git a/flake/pkgs/by-name/blink-cmp/package.nix b/flake/pkgs/by-name/blink-cmp/package.nix index df55de22..7c6371d1 100644 --- a/flake/pkgs/by-name/blink-cmp/package.nix +++ b/flake/pkgs/by-name/blink-cmp/package.nix @@ -3,18 +3,17 @@ stdenv, rustPlatform, fetchFromGitHub, - rust-jemalloc-sys, writeShellScriptBin, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "blink-cmp"; - version = "1.9.1"; + version = "1.8.0"; src = fetchFromGitHub { owner = "Saghen"; repo = "blink.cmp"; tag = "v${finalAttrs.version}"; - hash = "sha256-GgodXdWpQoF2z1g1/WvnSpfuhskw0aMcOoyZM5l66q8="; + hash = "sha256-JjlcPj7v9J+v1SDBYIub6jFEslLhZGHmsipV1atUAFo="; }; forceShare = [ @@ -32,16 +31,6 @@ 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 deleted file mode 100644 index cc7defc9..00000000 --- a/flake/pkgs/by-name/blink-cmp/patches/0001-pin-frizbee.patch +++ /dev/null @@ -1,29 +0,0 @@ -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" diff --git a/flake/pkgs/by-name/prettier-plugin-astro/package.nix b/flake/pkgs/by-name/prettier-plugin-astro/package.nix index 0c0d206f..d893da7c 100644 --- a/flake/pkgs/by-name/prettier-plugin-astro/package.nix +++ b/flake/pkgs/by-name/prettier-plugin-astro/package.nix @@ -3,8 +3,6 @@ fetchFromGitHub, nodejs, pnpm_9, - pnpmConfigHook, - fetchPnpmDeps, pins, }: let pin = pins.prettier-plugin-astro; @@ -19,8 +17,7 @@ in sha256 = pin.hash; }; - pnpmDeps = fetchPnpmDeps { - pnpm = pnpm_9; + pnpmDeps = pnpm_9.fetchDeps { inherit (finalAttrs) pname src; fetcherVersion = 2; hash = "sha256-K7pIWLkIIbUKDIcysfEtcf/eVMX9ZgyFHdqcuycHCNE="; @@ -28,9 +25,7 @@ in nativeBuildInputs = [ nodejs - (pnpmConfigHook.overrideAttrs { - propagatedBuildInputs = [pnpm_9]; - }) + pnpm_9.configHook ]; buildPhase = '' diff --git a/modules/neovim/init/filetype.nix b/modules/neovim/init/filetype.nix index 1aab6721..6f098c54 100644 --- a/modules/neovim/init/filetype.nix +++ b/modules/neovim/init/filetype.nix @@ -19,7 +19,7 @@ luaInline # `function(path, bufnr) ... end` # { 'dosini', { priority = 10 } }, - (listOf (either (either str luaInline) (submodule (submodule { + (listOf (either str (submodule { options = { priority = mkOption { type = ints.unsigned; @@ -31,7 +31,7 @@ ''; }; }; - })))) + }))) ]); in { options.vim.filetype = mkOption { @@ -80,18 +80,16 @@ in { 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 + bar = lib.mkLuaInline '' + bar = function(path, bufnr) + if some_condition() then + return 'barscript', function(bufnr) + -- Set a buffer variable + vim.b[bufnr].barscript_version = 2 end - return 'bar' - end, - } + end + return 'bar' + end, ''; }; }; diff --git a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix index 27603ad7..8e5ed4cc 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 ["inline" "split" "mini_diff"]; - default = "inline"; + type = enum ["default" "mini_diff"]; + default = "default"; description = "The preferred kind of provider."; }; }; diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index 0986e1e1..7cc5bda5 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -52,7 +52,6 @@ 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 deleted file mode 100644 index f7780cd9..00000000 --- a/modules/plugins/languages/make.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ - 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); - }; - }) - ]); -} diff --git a/modules/plugins/languages/php.nix b/modules/plugins/languages/php.nix index 8d2af124..193c0a1f 100644 --- a/modules/plugins/languages/php.nix +++ b/modules/plugins/languages/php.nix @@ -4,12 +4,11 @@ lib, ... }: let - inherit (builtins) attrNames toString; + inherit (builtins) attrNames; inherit (lib.options) mkEnableOption mkOption; inherit (lib.meta) getExe; inherit (lib.modules) mkIf mkMerge; - inherit (lib.types) enum int attrs listOf; - inherit (lib.nvim.lua) toLuaObject; + inherit (lib.types) enum; inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf; inherit (lib.nvim.attrsets) mapListToAttrs; inherit (lib.generators) mkLuaInline; @@ -65,21 +64,6 @@ 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"; @@ -98,38 +82,6 @@ in { description = "PHP LSP server to use"; }; }; - - 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 = { - 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 [ @@ -146,39 +98,5 @@ 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 = { - 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}, - }, - } - ''; - }; - }; - }) ]); } diff --git a/modules/plugins/ui/noice/config.nix b/modules/plugins/ui/noice/config.nix index e4721b66..1f81f4a9 100644 --- a/modules/plugins/ui/noice/config.nix +++ b/modules/plugins/ui/noice/config.nix @@ -6,6 +6,8 @@ }: 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; @@ -14,15 +16,16 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = ["nui-nvim"]; + startPlugins = [ + "noice-nvim" + "nui-nvim" + ]; + treesitter.grammars = optionals tscfg.addDefaultGrammars defaultGrammars; - lazy.plugins.noice-nvim = { - package = "noice-nvim"; - setupModule = "noice"; - event = ["DeferredUIEnter"]; - inherit (cfg) setupOpts; - }; + pluginRC.noice-nvim = entryAnywhere '' + require("noice").setup(${toLuaObject cfg.setupOpts}) + ''; }; }; } diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index ab116483..2e00e270 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -9,7 +9,6 @@ ./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 deleted file mode 100644 index 9859c7db..00000000 --- a/modules/plugins/utility/grug-far-nvim/config.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - 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 deleted file mode 100644 index 80a10a27..00000000 --- a/modules/plugins/utility/grug-far-nvim/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - 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 deleted file mode 100644 index 4795832e..00000000 --- a/modules/plugins/utility/grug-far-nvim/grug-far-nvim.nix +++ /dev/null @@ -1,9 +0,0 @@ -{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/modules/plugins/visuals/default.nix b/modules/plugins/visuals/default.nix index f989b878..3caf6e32 100644 --- a/modules/plugins/visuals/default.nix +++ b/modules/plugins/visuals/default.nix @@ -18,6 +18,5 @@ in { ./nvim-web-devicons ./rainbow-delimiters ./tiny-devicons-auto-colors - ./syntax-gaslighting ]; } diff --git a/modules/plugins/visuals/nvim-web-devicons/config.nix b/modules/plugins/visuals/nvim-web-devicons/config.nix index 98f54e34..9c8e9418 100644 --- a/modules/plugins/visuals/nvim-web-devicons/config.nix +++ b/modules/plugins/visuals/nvim-web-devicons/config.nix @@ -4,17 +4,18 @@ ... }: let inherit (lib.modules) mkIf; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.dag) entryAnywhere; cfg = config.vim.visuals.nvim-web-devicons; in { config = mkIf cfg.enable { vim = { - lazy.plugins.nvim-web-devicons = { - package = "nvim-web-devicons"; - setupModule = "nvim-web-devicons"; - event = ["DeferredUIEnter"]; - inherit (cfg) setupOpts; - }; + startPlugins = ["nvim-web-devicons"]; + + pluginRC.nvim-web-devicons = entryAnywhere '' + require("nvim-web-devicons").setup(${toLuaObject 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 b54ddcd5..6ff22614 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; + inherit (lib.options) mkOption mkEnableOption literalExpression; 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 = { - zsh = { - name = "Zsh"; - icon = ""; - color = "#428850"; - cterm_color = "65"; - }; - }; + example = literalExpression '' + { + 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/modules/plugins/visuals/syntax-gaslighting/config.nix b/modules/plugins/visuals/syntax-gaslighting/config.nix deleted file mode 100644 index 68bafde4..00000000 --- a/modules/plugins/visuals/syntax-gaslighting/config.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (lib.modules) mkIf; - inherit (lib.nvim.dag) entryAnywhere; - inherit (lib.nvim.lua) toLuaObject; - - cfg = config.vim.visuals.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 deleted file mode 100644 index bb0ad198..00000000 --- a/modules/plugins/visuals/syntax-gaslighting/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - 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 deleted file mode 100644 index 1de37411..00000000 --- a/modules/plugins/visuals/syntax-gaslighting/syntax-gaslighting.nix +++ /dev/null @@ -1,28 +0,0 @@ -{lib, ...}: let - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) str nullOr listOf bool; - inherit (lib.nvim.types) mkPluginSetupOption; -in { - options.vim.visuals = { - 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/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 72af1071..907983ed 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 (inputs.mnw.lib.npinsToPluginsAttrs pkgs ../../../npins/sources.json); + getPin = flip getAttr (pkgs.callPackages ../../../npins/sources.nix {}); # Build a Vim plugin with the given name and arguments. buildPlug = attrs: let diff --git a/modules/wrapper/environment/options.nix b/modules/wrapper/environment/options.nix index fdc07053..5b2f1f63 100644 --- a/modules/wrapper/environment/options.nix +++ b/modules/wrapper/environment/options.nix @@ -106,9 +106,16 @@ in { ''; }; - withRuby = mkEnableOption '' - Ruby support in the Neovim wrapper - ''; + # 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; + }; withNodeJs = mkEnableOption '' NodeJS support in the Neovim wrapper diff --git a/modules/wrapper/rc/config.nix b/modules/wrapper/rc/config.nix index 50211d2e..77a62d58 100644 --- a/modules/wrapper/rc/config.nix +++ b/modules/wrapper/rc/config.nix @@ -39,7 +39,6 @@ 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)})"; diff --git a/npins/sources.json b/npins/sources.json index f07d0d70..d9d1f9cc 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -643,19 +643,6 @@ "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": { @@ -2129,9 +2116,9 @@ }, "branch": "master", "submodules": false, - "revision": "746ffbb17975ebd6c40142362eee1b0249969c5c", - "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/746ffbb17975ebd6c40142362eee1b0249969c5c.tar.gz", - "hash": "sha256-jXWBPcfLwSkWQ/eRbxVDWC7kFOODSsCRmzC3rHKQLhQ=" + "revision": "b8221e42cf7287c4dcde81f232f58d7b947c210d", + "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/b8221e42cf7287c4dcde81f232f58d7b947c210d.tar.gz", + "hash": "sha256-lVrakFrpIP9lp7sMfMb33KeMPIkcn1qBFVytJzKCfuE=" }, "obsidian-nvim": { "type": "GitRelease", @@ -2541,19 +2528,6 @@ "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": { diff --git a/npins/sources.nix b/npins/sources.nix new file mode 100644 index 00000000..0b09e232 --- /dev/null +++ b/npins/sources.nix @@ -0,0 +1,115 @@ +{ + 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 +)