Today we’ve released a new version of the editor that can show lints in the code editor. The linting is implemented using Language Server Protocol, which hopefully will enable us to add more improvements to the code editor in the future.
To try out the linting, you first need to ensure you are running the latest version of the editor and then add this dependency in your
Once you add the dependency, you need to perform Project → Fetch Libraries and Project → Reload Editor Scripts actions.
Then, the editor will use our fork of sumneko’s lua-language-server that uses Luacheck to lint your edited files.
Additionally, we updated our editor scripts manual with new language servers section that describes how to add other language servers to do linting in the editor. For example, I experimented with using vscode’s JSON language server, to lint JSON files with JSON schema. I didn’t make it an extension though because it needs a nodeJS runtime to run which is like 80 Mb per platform. Another interesting language server to integrate into Defold would be a linter for our shader files, maybe based on glsl-language-server or something similar.
Try it out and tell us what you think!