From 3a28d05684f7f4e314eb4e56a5af624b648ab278 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 11:44:49 +0000 Subject: [PATCH 01/10] build(deps): bump beatlabs/delete-old-branches-action (#729) Bumps [beatlabs/delete-old-branches-action](https://github.com/beatlabs/delete-old-branches-action) from 0.0.10 to 0.0.11. - [Release notes](https://github.com/beatlabs/delete-old-branches-action/releases) - [Commits](https://github.com/beatlabs/delete-old-branches-action/compare/v0.0.10...v0.0.11) --- updated-dependencies: - dependency-name: beatlabs/delete-old-branches-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cleanup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 204dcba7..fbc12bc1 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v4 - name: "Delete old branches" - uses: beatlabs/delete-old-branches-action@v0.0.10 + uses: beatlabs/delete-old-branches-action@v0.0.11 with: repo_token: "${{ secrets.GITHUB_TOKEN }}" date: "1 months ago" From 60c3a2ff1e2a30d1b245592da84f231098d4ec75 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Date: Sat, 22 Mar 2025 17:57:21 +0100 Subject: [PATCH 02/10] nvim-lint: fix config syntax (#735) --- modules/plugins/diagnostics/nvim-lint/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/diagnostics/nvim-lint/config.nix b/modules/plugins/diagnostics/nvim-lint/config.nix index 49517f72..085140dc 100644 --- a/modules/plugins/diagnostics/nvim-lint/config.nix +++ b/modules/plugins/diagnostics/nvim-lint/config.nix @@ -13,7 +13,7 @@ in { vim = { startPlugins = ["nvim-lint"]; pluginRC.nvim-lint = entryAnywhere '' - require("lint").linters_by_ft(${toLuaObject cfg.linters_by_ft}) + require("lint").linters_by_ft = ${toLuaObject cfg.linters_by_ft} ''; }; }; From 58021beb1c952c55feb693c1469dd9e9c9c9e7a5 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:01:51 +0100 Subject: [PATCH 03/10] lazy: fix incomplete event type --- modules/wrapper/lazy/lazy.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wrapper/lazy/lazy.nix b/modules/wrapper/lazy/lazy.nix index 5d67aa59..eb1f5cdf 100644 --- a/modules/wrapper/lazy/lazy.nix +++ b/modules/wrapper/lazy/lazy.nix @@ -126,7 +126,7 @@ }; event = mkOption { - type = nullOr (oneOf [str (listOf str) lznEvent]); + type = nullOr (oneOf [str lznEvent (listOf (either str lznEvent))]); default = null; description = "Lazy-load on event"; }; From e2d10e8fb20c8a366a23bcd97535ecd3b3b940c8 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:02:13 +0100 Subject: [PATCH 04/10] lazy: create LazyFile user event --- modules/wrapper/lazy/config.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/wrapper/lazy/config.nix b/modules/wrapper/lazy/config.nix index 3468d5ec..c1bd8829 100644 --- a/modules/wrapper/lazy/config.nix +++ b/modules/wrapper/lazy/config.nix @@ -134,6 +134,15 @@ in { startPlugins = ["lz-n" "lzn-auto-require"]; optPlugins = pluginPackages; + augroups = [{name = "nvf_lazy_file_hooks";}]; + autocmds = [ + { + event = ["BufReadPost" "BufNewFile" "BufWritePre"]; + group = "nvf_lazy_file_hooks"; + command = "doautocmd User LazyFile"; + once = true; + } + ]; lazy.builtLazyConfig = '' require('lz.n').load(${toLuaObject lznSpecs}) From c639cf50646abc67f87231654c49d749c8b16135 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:02:40 +0100 Subject: [PATCH 05/10] copilot: load on LazyFile --- modules/plugins/assistant/copilot/config.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/plugins/assistant/copilot/config.nix b/modules/plugins/assistant/copilot/config.nix index 37da046f..525fe3bd 100644 --- a/modules/plugins/assistant/copilot/config.nix +++ b/modules/plugins/assistant/copilot/config.nix @@ -37,6 +37,12 @@ in { inherit (cfg) setupOpts; after = mkIf cfg.cmp.enable "require('copilot_cmp').setup()"; + event = [ + { + event = "User"; + pattern = "LazyFile"; + } + ]; cmd = ["Copilot" "CopilotAuth" "CopilotDetach" "CopilotPanel" "CopilotStop"]; keys = [ (mkLuaKeymap ["n"] cfg.mappings.panel.accept (wrapPanelBinding ''require("copilot.panel").accept'' cfg.mappings.panel.accept) "[copilot] Accept suggestion" {}) From 5f99c7f4e5cd7db5a3d0ef3e56b0beb75411f93a Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:07:27 +0100 Subject: [PATCH 06/10] docs: update release notes --- docs/release-notes/rl-0.8.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index c84ef199..e1c1f38f 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -89,6 +89,7 @@ [blink.cmp]: https://github.com/saghen/blink.cmp - Add [blink.cmp] support. +- Add `LazyFile` user event. [diniamo](https://github.com/diniamo): @@ -244,8 +245,8 @@ syncing of nvim shell environment with direnv's. - Add [blink.cmp] source options and some default-disabled sources. - Add [blink.cmp] option to add - [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) - so blink.cmp can source snippets from it. + [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) so + blink.cmp can source snippets from it. - Fix [blink.cmp] breaking when built-in sources were modified. [TheColorman](https://github.com/TheColorman): From d105f699219954d973a9f56c60b1be120b67fde4 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:13:44 +0100 Subject: [PATCH 07/10] docs: mention LazyFile --- .../configuring/custom-plugins/lazy-method.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/manual/configuring/custom-plugins/lazy-method.md b/docs/manual/configuring/custom-plugins/lazy-method.md index c6fd7106..ae766535 100644 --- a/docs/manual/configuring/custom-plugins/lazy-method.md +++ b/docs/manual/configuring/custom-plugins/lazy-method.md @@ -38,3 +38,22 @@ As of version **0.7**, we exposed an API for configuring lazy-loaded plugins via }; } ``` + +## LazyFile event {#sec-lazyfile-event} + +You can use the `LazyFile` user event to load a plugin when a file is opened: + +```nix +{ + config.vim.lazy.plugins = { + "aerial.nvim" = { + package = pkgs.vimPlugins.aerial-nvim; + event = [{event = "User"; pattern = "LazyFile";}]; + # ... + }; + }; +} +``` + +You can consider `LazyFile` as an alias to +`["BufReadPost" "BufNewFile" "BufWritePre"]` From 7696f470a7ccd23fa12875256779032d0aa43cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phan=20=C4=90=C4=83ng=20Khoa?= Date: Sun, 23 Mar 2025 22:57:38 +0700 Subject: [PATCH 08/10] eslint_d: added conditions for launching eslint_d (#737) * eslint_d: added conditions for launching eslint_d * eslint_d: documented changes to docs/release-notes/rl-0.8.md --------- Co-authored-by: raf --- docs/release-notes/rl-0.8.md | 4 ++++ modules/plugins/languages/astro.nix | 10 ++++++++++ modules/plugins/languages/svelte.nix | 10 ++++++++++ modules/plugins/languages/ts.nix | 10 ++++++++++ 4 files changed, 34 insertions(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index c84ef199..32a8c28e 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -271,3 +271,7 @@ [Butzist](https://github.com/butzist): - Add Helm chart support under `vim.languages.helm`. + +[rice-cracker-dev](https://github.com/rice-cracker-dev): + +- `eslint_d` now checks for configuration files to load. diff --git a/modules/plugins/languages/astro.nix b/modules/plugins/languages/astro.nix index 9e70424b..d5672af0 100644 --- a/modules/plugins/languages/astro.nix +++ b/modules/plugins/languages/astro.nix @@ -72,6 +72,16 @@ ls_sources, null_ls.builtins.diagnostics.eslint_d.with({ command = "${getExe pkg}", + condition = function(utils) + return utils.root_has_file({ + "eslint.config.js", + "eslint.config.mjs", + ".eslintrc", + ".eslintrc.json", + ".eslintrc.js", + ".eslintrc.yml", + }) + end, }) ) ''; diff --git a/modules/plugins/languages/svelte.nix b/modules/plugins/languages/svelte.nix index a3c55e10..4d96c20a 100644 --- a/modules/plugins/languages/svelte.nix +++ b/modules/plugins/languages/svelte.nix @@ -72,6 +72,16 @@ ls_sources, null_ls.builtins.diagnostics.eslint_d.with({ command = "${getExe pkg}", + condition = function(utils) + return utils.root_has_file({ + "eslint.config.js", + "eslint.config.mjs", + ".eslintrc", + ".eslintrc.json", + ".eslintrc.js", + ".eslintrc.yml", + }) + end, }) ) ''; diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix index c9070554..790c235a 100644 --- a/modules/plugins/languages/ts.nix +++ b/modules/plugins/languages/ts.nix @@ -123,6 +123,16 @@ ls_sources, null_ls.builtins.diagnostics.eslint_d.with({ command = "${getExe pkg}", + condition = function(utils) + return utils.root_has_file({ + "eslint.config.js", + "eslint.config.mjs", + ".eslintrc", + ".eslintrc.json", + ".eslintrc.js", + ".eslintrc.yml", + }) + end, }) ) ''; From ac59df1bc91b6e1f7f5c7847de73b2e4a8731557 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 24 Mar 2025 08:43:04 +0300 Subject: [PATCH 09/10] treewide: remove `nmd` dependency --- docs/default.nix | 2 -- flake.lock | 17 ----------------- flake.nix | 6 ------ modules/plugins/statusline/lualine/lualine.nix | 2 -- 4 files changed, 27 deletions(-) diff --git a/docs/default.nix b/docs/default.nix index 48cff563..98b29db0 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -95,8 +95,6 @@ inherit (nvimModuleDocs) optionsJSON; }; in { - inherit (inputs) nmd; - # TODO: Use `hmOptionsDocs.optionsJSON` directly once upstream # `nixosOptionsDoc` is more customizable. options.json = diff --git a/flake.lock b/flake.lock index 3ced812a..603d0f50 100644 --- a/flake.lock +++ b/flake.lock @@ -106,22 +106,6 @@ "type": "github" } }, - "nmd": { - "flake": false, - "locked": { - "lastModified": 1705050560, - "narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=", - "owner": "~rycee", - "repo": "nmd", - "rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3", - "type": "sourcehut" - }, - "original": { - "owner": "~rycee", - "repo": "nmd", - "type": "sourcehut" - } - }, "root": { "inputs": { "flake-parts": "flake-parts", @@ -129,7 +113,6 @@ "mnw": "mnw", "nil": "nil", "nixpkgs": "nixpkgs", - "nmd": "nmd", "systems": "systems_2" } }, diff --git a/flake.nix b/flake.nix index 30b71f80..6e716581 100644 --- a/flake.nix +++ b/flake.nix @@ -86,12 +86,6 @@ # Alternate neovim-wrapper mnw.url = "github:Gerg-L/mnw"; - # For generating documentation website - nmd = { - url = "sourcehut:~rycee/nmd"; - flake = false; - }; - # Language servers (use master instead of nixpkgs) nil = { url = "github:oxalica/nil"; diff --git a/modules/plugins/statusline/lualine/lualine.nix b/modules/plugins/statusline/lualine/lualine.nix index 9943f78e..bf070db7 100644 --- a/modules/plugins/statusline/lualine/lualine.nix +++ b/modules/plugins/statusline/lualine/lualine.nix @@ -124,8 +124,6 @@ in { mkOption { type = enum themesConcatted; default = "auto"; - # TODO: xml generation error if the closing '' is on a new line. - # issue: https://gitlab.com/rycee/nmd/-/issues/10 defaultText = ''`config.vim.theme.name` if theme supports lualine else "auto"''; description = "Theme for lualine"; }; From df1b3f796831d942b6e405355bdc5a3637429c0a Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 24 Mar 2025 11:57:38 +0300 Subject: [PATCH 10/10] blink: v0.13.1 -> v0.14.1 --- flake/legacyPackages/blink-cmp.nix | 24 +++++------------------- npins/sources.json | 8 ++++---- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/flake/legacyPackages/blink-cmp.nix b/flake/legacyPackages/blink-cmp.nix index ba1d7424..477616aa 100644 --- a/flake/legacyPackages/blink-cmp.nix +++ b/flake/legacyPackages/blink-cmp.nix @@ -1,11 +1,11 @@ { + stdenv, rustPlatform, hostPlatform, vimUtils, git, src, version, - fetchpatch, }: let blink-fuzzy-lib = rustPlatform.buildRustPackage { pname = "blink-fuzzy-lib"; @@ -19,11 +19,6 @@ nativeBuildInputs = [git]; }; - - libExt = - if hostPlatform.isDarwin - then "dylib" - else "so"; in vimUtils.buildVimPlugin { pname = "blink-cmp"; @@ -31,22 +26,13 @@ in # blink references a repro.lua which is placed outside the lua/ directory doCheck = false; - preInstall = '' + preInstall = let + ext = stdenv.hostPlatform.extensions.sharedLibrary; + in '' mkdir -p target/release - ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy.${libExt} target/release/libblink_cmp_fuzzy.${libExt} - echo -n "nix" > target/release/version + ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy${ext} target/release/libblink_cmp_fuzzy${ext} ''; - # Borrowed from nixpkgs - # TODO: Remove this patch when updating to next version - patches = [ - (fetchpatch { - name = "blink-add-bypass-for-nix.patch"; - url = "https://github.com/Saghen/blink.cmp/commit/6c83ef1ae34abd7ef9a32bfcd9595ac77b61037c.diff?full_index=1"; - hash = "sha256-304F1gDDKVI1nXRvvQ0T1xBN+kHr3jdmwMMp8CNl+GU="; - }) - ]; - # Module for reproducing issues nvimSkipModule = ["repro"]; } diff --git a/npins/sources.json b/npins/sources.json index 91c3f68e..53cb810e 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -46,10 +46,10 @@ "pre_releases": false, "version_upper_bound": null, "release_prefix": null, - "version": "v0.13.1", - "revision": "29861baf37bbb16f5dbf524a6edac5daaad6f4fc", - "url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v0.13.1", - "hash": "1y5p7i6g884r65mhfsazx28g0qs37hc57jm37i7kch9kcf8m7sbq" + "version": "v0.14.1", + "revision": "7a91dc584f41f5aa2373a917faf8100b2e54d6c9", + "url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v0.14.1", + "hash": "0zm6s3v9liimx28vs1g5yi7bcfrl691q81bvzmdpavcwrzcdb0c8" }, "blink-cmp-spell": { "type": "Git",