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

Posted by Kevnuke on Sun 21 Jul 2019 04:26 AM — 4 posts, 20,591 views.

USA #0
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?
Australia Forum Administrator #1
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


Amended on Sun 21 Jul 2019 06:18 AM by Nick Gammon
USA Global Moderator #2
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.
Amended on Sun 21 Jul 2019 03:23 PM by Fiendish
USA #3
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