mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(news): use $VIMRUNTIME for news.txt path
Use `vim.env.VIMRUNTIME` to resolve `news.txt` instead of `nvim_get_runtime_file()`, which can return a plugin's `news.txt` (e.g., rainbow-delimiters.nvim) instead of Neovim's bundled one.
This commit is contained in:
parent
c64a61734f
commit
4ff5e8bf81
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ function M.open(file, opts)
|
||||||
end
|
end
|
||||||
file = plugin.dir .. "/" .. file
|
file = plugin.dir .. "/" .. file
|
||||||
elseif opts.rtp then
|
elseif opts.rtp then
|
||||||
file = vim.api.nvim_get_runtime_file(file, false)[1]
|
file = vim.fs.joinpath(vim.env.VIMRUNTIME, "doc", "news.txt")
|
||||||
end
|
end
|
||||||
|
|
||||||
if not file then
|
if not file then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue