From 60fea6236e342e1f4aa34d078461746d5f587c74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 1 Mar 2026 09:17:53 +0100 Subject: [PATCH] fix(news): resolve news.txt from $VIMRUNTIME first Plugins that ship their own `doc/news.txt` (e.g. rainbow-delimiters.nvim) can shadow Neovim's bundled file when using `nvim_get_runtime_file()`. First check $VIMRUNTIME, then fall back to the full runtimepath. Fixes #7019 --- lua/lazyvim/util/news.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/util/news.lua b/lua/lazyvim/util/news.lua index f473f3a3..c891133f 100644 --- a/lua/lazyvim/util/news.lua +++ b/lua/lazyvim/util/news.lua @@ -51,7 +51,9 @@ function M.open(file, opts) end file = plugin.dir .. "/" .. file elseif opts.rtp then - file = vim.api.nvim_get_runtime_file(file, false)[1] + -- first check if file exists in VIMRUNTIME, then check the full runtimepath + local path = vim.env.VIMRUNTIME .. "/" .. file --[[@as string]] + file = vim.uv.fs_stat(path) and path or vim.api.nvim_get_runtime_file(file, false)[1] end if not file then