mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
style: Set vim.opt.rtp type to vim.Option (#1498)
## Details There is an issue in the `neodev` repo that mentions this: [#193](https://github.com/folke/neodev.nvim/issues/193) I think the problem comes from a combination of 2 things: 1. As mentioned in the [Reddit post](https://www.reddit.com/r/neovim/comments/1cvrilk/diagnosticwarning_after_upgrade_to_neovim_010/): `Nvim never had Lua type annotations for vim.opt`. 2. Setting `vim.opt.rtp` anywhere in the config will cause Lua-LS to infer the type for `vim.opt.rtp`. While users are unlikely to do this it does happen in `lazy.nvim`, in places shown in this PR.
This commit is contained in:
parent
ebbf84eb23
commit
784a726f2e
3 changed files with 3 additions and 0 deletions
|
@ -5,6 +5,7 @@ local Util = require("lazy.util")
|
|||
describe("util", function()
|
||||
local rtp = vim.opt.rtp:get()
|
||||
before_each(function()
|
||||
---@type vim.Option
|
||||
vim.opt.rtp = rtp
|
||||
for k, v in pairs(package.loaded) do
|
||||
if k:find("^foobar") then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue