neodev.nvim
neodev.nvim copied to clipboard
fix: improve typing for scoped variables
Problem:
Seeing diagnostic warnings about undefined field when accessing window/buffer/tab scoped variables
vim.w.my_window_var -- Undefined field `my_window_var`.
Solution:
More correct type definition for vim.b/w/t that accounts for the raw (non-numeric) variable access. This uses the @field annotation syntax to describe all keys of a certain type (detailed here)
+1, I just ran into this when using vim.b.term_title and came to check for a bug report.