lua-language-server
lua-language-server copied to clipboard
[Question] Large size type annotation file cause low performance. Is it possible to fix it?
In my project I have a special Lua file used to give type hint, it defines many field such as:
---@class UnityEngine.TransitionType
---@field Normal UnityEngine.TransitionType
---@field Entry UnityEngine.TransitionType
---@field Exit UnityEngine.TransitionType
UnityEngine.TransitionType = {}
---@class UnityEngine.StateInfoIndex
---@field CurrentState UnityEngine.StateInfoIndex
---@field NextState UnityEngine.StateInfoIndex
---@field ExitState UnityEngine.StateInfoIndex
---@field InterruptedState UnityEngine.StateInfoIndex
UnityEngine.StateInfoIndex = {}
--- ...more below
It contains all type using in my project so it's very large (about 5000KB), and caused low diagnostic speed when LLS runs. Is it possible to optimize performance for those special type annotation file? Or I have to simplify this Lua file.