lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

How to override a meta file definition?

Open UtkarshVerma opened this issue 1 year ago • 0 comments

I am using a 3rd party library for neovim runtime (neodev) which defines types for the global variables. There's a table which it generally annotates as:

---@meta

---@type table<integer, table<string, any>>
vim.b = {}

Is there way I can override this definition in my project scope as shown below?

---@meta

---@type table<integer, {autoformat?: boolean}>
vim.b = {}

The problem that I have currently is that the LSP infers vim.b[0].autoformat as any because the definitions annotate it as any|boolean.

UtkarshVerma avatar Feb 26 '24 01:02 UtkarshVerma