Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Lua ➜ What is your preferred IDE/program for MUDs you play on MUSHclient?

What is your preferred IDE/program for MUDs you play on MUSHclient?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Kevnuke   USA  (145 posts)  Bio
Date Sun 21 Jul 2019 04:26 AM (UTC)
Message
I've used Notepad++ from the beginning, but I was wondering if there are any IDEs that would be better for plugin development since setting the language to XML effectively trashes all the Lua syntax highlighting inside the script section of the plugin. Or maybe I've just been doing it wrong.

I used IntelliJ IDEA for the Java project I did for school last semester and really liked it but I don't know if I'd have the same problem of Lua code inside XML tags. I know it has an addon for Lua highlighting. Any suggestions?
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 21 Jul 2019 06:16 AM (UTC)

Amended on Sun 21 Jul 2019 06:18 AM (UTC) by Nick Gammon

Message
I quite like Geany. It is free and quite powerful without being overwhelming.

The problem with mixing XML and Lua is quite annoying, but you can work around it by using dofile to split the two languages into separate files. For example:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="Some_Plugin"
   author="Nick Gammon"
   id="598bd27e54abc0d4c6ade961"
   language="Lua"
   purpose="Example plugin"
   date_written="2019-07-21"
   requires="5.00"
   version="1.0"
   >
</plugin>

<script>
  dofile (GetPluginInfo (GetPluginID (), 20) .. "Some_Plugin.lua")
</script>
</muclient>




Now you put the Lua code into Some_Plugin.lua, which when edited is now syntax coloured correctly.

Geany supports stuff like:


  • Syntax colouring
  • Find and replace using regular expressions (very useful for adding stuff to the start or end of a whole sequence of lines)
  • Going to the declaration of a function. Put the cursor on a function call and press Ctrl+T and the cursor switches to where the function is declared.
  • Marking multiple spots and letting you jump there.
  • You can see function names in a sidebar (see image) - click on one to jump to it.
  • With a bit of mucking around you can get it to execute Lua code from within the IDE, nice for testing. You can also compile C++ etc.
  • Folding (collapsing) functions - not that I use that much
  • Find in files - again, quite useful



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #2 on Sun 21 Jul 2019 03:20 PM (UTC)

Amended on Sun 21 Jul 2019 03:23 PM (UTC) by Fiendish

Message
These days I tend to use vscode (https://code.visualstudio.com) for everything. I think you'll never get around the fact that syntax highlighters aren't programmed to look for language changes in the middle of a file. Usually I just set the language to Lua instead of XML and ignore the wrong highlighting in the XML part.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Kevnuke   USA  (145 posts)  Bio
Date Reply #3 on Tue 23 Jul 2019 09:59 PM (UTC)
Message
Thank you both for the input. I ended up changing the language to Lua for my plugin weeks ago as a quick fix. I'll have to see how those compare to the Lua addon for IntelliJ when I get it running
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,122 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.