This repository has been archived by the owner on Jul 6, 2024. It is now read-only.
Remove nightly meta annotations conflicting with upstream neovim #175
Labels
enhancement
New feature or request
Did you check the docs?
Is your feature request related to a problem? Please describe.
neodev.nvim has been doing a great job in providing the missing piece for neovim+Lua development: the Lua type annotations. We have the following in
types/nightly/*.lua
:(As of 1/22/2024)
@alias
-> actually they are misleading, should be removedvim.api.*
vim.cmd.*
vim.{json,mpack}
, etc. and other misc.vim.{wo,bo,o}
vim.loop
orvim.uv
vim.fn
I've checked ones that are now superseded by an official, upstream meta annotation (at
$VIMRUNTIME/lua/_meta/*
) in neovim 0.10.x-nightly. Unchecked ones are still on the way to go towards 0.10.The problem is that these meta files conflict with the one in $VIMRUNTIME in Lua-LS, and neodev's one is often incorrect in typings, giving a lots of false-positive diagnostic warnings. The upstream meta files are ensured always up-to-date as they are auto-generated from the source of truth.
Describe the solution you'd like
So in summary, we could (gradually) remove the conflicting meta files --- everything but
vim.cmd
andvim.uv
(which are currently in progress) fromnightly/*
which are not available yet. For stable (0.9.x) we can still keep things because they are still useful until 0.10 release.Describe alternatives you've considered
One who is sitting at Nvim nightly can actually disable neodev.nvim from their config, and configure
settings.Lua.workspace.library
manually to avoid a conflict. The only drawback is that no typings forvim.cmd
andvim.uv
yet --- but this can be addressed manually (e.g. copying the source to some folder).Alternative, we can also consider separating each meta file into separate subdirectory so that one can opt in and out of each individually via neodev.setup -- or by configuring
settings.Lua.workspace.library
.Eventually, neodev.nvim won't be needed when we arrive at Nvim 0.10-stable.
Additional context
N/A
The text was updated successfully, but these errors were encountered: