Description
I use Lua both as programming language and as file format for storing data and dynamicaly loading it into Lua enviroment. Usually this data is generated, saved and loaded during a single script execution. These files are pretty big and contain a single value of known type which is returned.
Since these files are huge, they shouldn't be processed in a usual manner. Thus, they should be put into Lua.workspace.ignoreDir
list. However, in that case the type of returned value will not processed as well (actually, it is processed as long as the file is opened, but once it's closed, language server forgets its type. Here is an example of such behaviour. filters.lua
is a big table of words that are to be filtered during text processing)
I tried to put ---@meta
annotation in that file in hopes that contents of returned table would not be processed but they were which was unexpected. I tried to use ---@diagnostic disable
annotation but it seems that the file still is being diagnosted. I also tried to put ---@return table
annotation on top of the file (since each lua
file is basically a function) but this annotation is ignored.
So right now, it seems that a file can be either ignored or processed entirely. Is there a way to somehow specify types in a file but disable all other processing of it?