Linting and Code Navigation in the code editor

Not exacly releated but, how lsp annotations (Definition Files for meta) are generated for this project and where are they? I can’t find them in the repo… There is a defold meta files but they are old(from old source).
I would like to use them with Sublime Text very much, currently I’m using old ones.

1 Like

We don’t generate them yet. There is a community project that generates the annotations for various Defold versions.

1 Like

this is more than enough, great, thank you

1 Like

Hi! It does not work for me :frowning:
I am using Windows.

  1. Latest editor is installed
  2. Correct dependency is added to the project and fetched
  3. Editor scripts are reloaded

I have even tried to restart the editor and reboot the PC.
The logs are:

java.io.IOException: Cannot run program “C:\misc\gd\test-project\build\plugins\lsp-lua-language-server\plugins\bin\x86_64-win32\bin\lua-language-server.exe” (in directory “C:\misc\gd\test-project”)
CreateProcess error=2, Can’t locate the specified file

That file does not exist indeed.
I have tried to create .defignore file with /build/plugins line, as somebody did in this thread, but this did not help.

What am I doing wrong?
Thanks!

I would recommend that you run Defold from somewhere in your user home folder and also create your projects there. Running from a custom folder directly on the C:/ drive will most likely cause problems.

Unfortunately it did not help :frowning:
Same issue reproduces in user home folder.
It looks like some files are just not fetched for some reason.
image

I would look into your anti virus tools, because it seems like such a case where it removes things from your folder.

What’s your lsp dependency? Is it https://github.com/defold/lua-language-server/releases/download/v0.0.5/release.zip?

Yes. This one:

I don’t use any antivirus actually. Only Windows Defender. Disabling it did not help.

1 Like

Oh. My link was actually slightly different! With the link from the OP everything works fine!
Thank you very much and sorry for the noise :slight_smile:

1 Like

This plugin is working well, however I need to add it as a project dependency in game.project file for every projects. Is there any way to install it as a editor plugin?

Eventually we will integrate this language server into the editor, using a dependency is a temporary solution/a way to try it out

4 Likes

Hi,

This is a life saver. Very helpful. Can’t wait for full intergration.

I am having a problem with .luacheckrc

I have placed .luacheckrc in the root folder (where game.project resides) and the file contains:

unused_args = false

However no matter what I try, it won’t ignore unused function arguments. I have also tried renaming them with _underscore but no luck.

Not sure why it is not working. Please create a bug report in the repository for the extension.

Renaming to _ alone and not _varname works fine (perhaps that’s what was mean’t). The . file never works though.

Made a report from the editor to github now I have found out where. Thank you for the suppport.

I seem to have this exact issue.

Just a heads up folks, as of this morning the Lua language server is now a part of the editor distribution. Yay!

21 Likes

Does this mean we can remove it from dependencies?

Yes.