Skip to content
jinzhongjia edited this page Sep 3, 2023 · 7 revisions

For lua_ls

if you are use lua_ls, I recommand you use type_definition instead of definition, The reason is as follows:

We randomly list a piece of code

M.setup = function(config)
   -- ... do something
end

when you use definition, lua_ls will return you two positions, one is M.setup, another is function(config)

when you use type_definition, lua_ls will only return you one position, it is function(config)


Clone this wiki locally