-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lua: add support for Lua Language Server #11035
Comments
Just want to say, that some tarantool Lua module already have type annotations in LDoc format (etcd-client, expirationd, metrics) or Also, Lua tagging systems are fragmented, see lunarmodules/ldoc#403:
Footnotes |
After discussing the idea of LSP verbally with @Totktonada and @ochaton we came with a few points that'd make this feature really helpful.
A few raw points that are reasonable though still remain not so clear.
Outside of the scope of the discussion.
|
Trying to figure out how to annotate [^1] LuaLS/lua-language-server#1861 |
Introduction
Lua used by Tarantool has dynamic type system. It may complicate the development of the Tarantool applications because of lack of static checks and absence of IDE/text editor autocomplete support since types of the values can't be inferred before script execution. There are tools such as Lua Language Server (ex. Sumneko Lua Server) [1] allowing providing type annotations and class definitions for performing some static checks. There is a Tarantool VSCode extension [2] for Lua Language Server with type definitions for the most of the Tarantool functions. The problem is that the extension is maintained externally. It means some of the type definitions are deprecated and aren't used in the internal code during the development.
Suggestion
It's suggested to migrate the type definitions inside the Tarantool itself and to provide a straightforward way to supply IDE with type definitions for performing static checks when developing Tarantool. It'd good to reuse the language server checks during the development to make new code more reliable, simplify the development and review process. Also, this type definitions may involve documentation on the functions thus they can be reused for exporting documentation reference.
Implementation
Adding the support includes the following tasks.
box
,clock
,config
,decimal
,fiber
,json
,log
,net.box
,string
,table
,uri
,uuid
,yaml
modules (lua: add basic Lua Language Server support #11038).buffer
,csv
,datetime
,digest
,fio
,fun
,http
,merger
,pickle
,socket
,utf8
.crypto
,iconv
,popen
,strict
,swim
,xlog
.vshard
luatest
crud
queue
expirationd
kafka
Iterations
Since the task is even too big for a single epic, it's split into iterations.
Reference list
The text was updated successfully, but these errors were encountered: