• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community
  • The forum is currently open to new registrations. The registration will close for a short period of time when reaching 500 active members, to upgrade the server resources.

XREF etc (1 Viewer)

Loggy

Newcomer
Joined
Dec 16, 2020
Messages
9
Reaction score
2
In my (relative) youth I spent a lot of time writing models in Fortran, mainly in the mathematics, physics and statistics modelling areas.

I soon found that cross referencing and layout tools were very useful, particularly Forcheck that checks arguments, line numbers where identifiers are used and other things and SPAG, which turns hack-written additions to code into something more readable so I could see what the call tree looked like, tidy the code where appropriate and quickly navigate to a particular area.

Pretty-printing is not such a problem as an indented block structure layout is an immediate guide to following the code but cross referencing is not so easy and I frequently revert to drawing a map on paper.

Apart from luacheck, which helps with declarations and mismatching of type, I have found little to help with Lua so I spend rather too much time trying to remember things when it is already in the code or check where a particular variable is mentioned. I use UltraEdit from IDM as an editor (on Windows although all code is run on Linux) and that has a wordfile for Lua and good search facilities but I still hanker after better tools.

Does anyone have a favourite tool set?
 

gilzoide

Newcomer
Joined
Dec 16, 2020
Messages
3
Reaction score
0
I guess you could use a good code editor with Language Server Protocol (LSP) support and some LSP implementation for Lua, like lua-language-server (this one has also a plugin for Visual Studio Code), lua-lsp, EmmyLua-LanguageServer (this one has config examples for Sublime Text and Emacs) or VSCode-EmmyLua (also for VSCode).

I don't know if UltraEdit supports talking to LSP servers, but if it does it should be just a matter of installing one of them and configuring your editor to run it =]
 

Loggy

Newcomer
Joined
Dec 16, 2020
Messages
9
Reaction score
2
Thanks for your suggestions @gilzoide.

I will ask IDM but as they also have UltraStudio they may already have gone down their own path.

There is a wordfile for UltraEdit/UltraStudio so syntax highlighting including folding blocks and other things work fine. I have been using UE/US for many years now.

Most things Microsoft do are after everyone else has done it for years (eg awareness of the internet) - I'm waiting for them to follow Apple's lead and replace the underlying system with *nix that rescued Apple from obscurity (OS9 wasn't too hot!). At least they are beginning to understand open source these days and LSP seems to be a good move.
 

gilzoide

Newcomer
Joined
Dec 16, 2020
Messages
3
Reaction score
0
You're welcome!
I use several different languages, so I really like and use LSPs because we can have a single tool for fetching documentation, keywords/variables/functions/methods autocompletion, finding and navigating to symbol references, renaming symbols, etc, always with the same button mapping and all integrated into a single code editor, one that might be already tuned up for personal usage.

As for Microsoft, well, better later than never =D
 

Loggy

Newcomer
Joined
Dec 16, 2020
Messages
9
Reaction score
2
The next version of UEStudio (v 21) should work with LSP. That is due out in January so I will see whether I can get it to work, or how good it is.:)
 

dinsdale247

Moderator
Staff member
Community Patron
Creator of WinLua
Joined
Nov 17, 2020
Messages
68
Reaction score
27
Location
Victoria BC
Website
winlua.net
Have you tried the ZeroBrane Editor? It's a Lua based IDE for Lua. It's quite good and has a built in debugger.

I use Geany on all platforms (Windows, Linux, MacOS, FreeBSD) if I have a GUI. I like it because it's super light weight and has nice lightweight projects. It has keyword highlighting for many, many languages. I also like it's grep file search and regex as well. If you set up a project and open all your referenced Lua files, it can do lookups using ctrl + t. But you have better tools with UE probably.

KDevelop is a C/C++ environment that has good Lua support.

For VSCode, EmmyLua as mentioned above is quite good. EmmyLua is also available on all JetBrains platforms (I have CLion). There are two Lua plugins for JetBrains IDEs.

There used to be a very good plugin for Eclipse called "Lua Development Tools for Eclipse" (LDT). The project fell apart and the code has become stale. There is effectively no Lua support in Eclipse.

Visual Studio proper has a plugin for Lua but I remember it being quite poor.

The best Lua environment I have used is Roblox Studio for writing Roblox video games. Go figure. (No it won't work for your purposes)
 
Top