From 540301ac03e3c598e5756f0c96bb772764b908a1 Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Tue, 23 May 2023 20:31:31 +0800 Subject: [PATCH] vimPlugins.lazy-nvim: Fix lazy.nvim try to write helptags on readonly fs E5108: Error executing lua: .../pack/myNeovimPackages/start/lazy.nvim/lua/lazy/help.lua:42: Vim:E152: Cannot open /nix/store/...-vim-pack-dir/pack/myNeovimPackages/start/lazy.nvim/doc/tags for writing --- .../applications/editors/vim/plugins/overrides.nix | 4 ++++ .../plugins/patches/lazy-nvim/no-helptags.patch | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/applications/editors/vim/plugins/patches/lazy-nvim/no-helptags.patch diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 4e6fee9b88fe..6ec20ca15db2 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -642,6 +642,10 @@ self: super: { dependencies = with self; [ nvim-lspconfig ]; }); + lazy-nvim = super.lazy-nvim.overrideAttrs (old: { + patches = [ ./patches/lazy-nvim/no-helptags.patch ]; + }); + lean-nvim = super.lean-nvim.overrideAttrs (old: { dependencies = with self; [ nvim-lspconfig plenary-nvim ]; }); diff --git a/pkgs/applications/editors/vim/plugins/patches/lazy-nvim/no-helptags.patch b/pkgs/applications/editors/vim/plugins/patches/lazy-nvim/no-helptags.patch new file mode 100644 index 000000000000..7336f0e75c41 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/patches/lazy-nvim/no-helptags.patch @@ -0,0 +1,14 @@ +diff --git a/lua/lazy/help.lua b/lua/lazy/help.lua +index 4a289eb..5ddc168 100644 +--- a/lua/lazy/help.lua ++++ b/lua/lazy/help.lua +@@ -38,9 +38,6 @@ function M.index(plugin) + end + + function M.update() +- if Config.plugins["lazy.nvim"] then +- vim.cmd.helptags(Config.plugins["lazy.nvim"].dir .. "/doc") +- end + if Config.options.readme.enabled == false then + return + end