Lua syntax highlights for Notepad++, UltraEdit, etc.. + WoW Ace2 Ace3 API recognition
Last thread update: 05 July 2010
This is a project for World of Warcraft AddOn authors providing the LUA/XML syntax highlighting script updated for the major text editors, the project now supports Notepad++, UltraEdit, PSPad and RjTextEd Notepad++ uses a homemade plugin based on External lexers and GmodLua, and I completely rewrote the folding procedures so they performs better on Lua code The API extractions are now done automatically through an addon so I will provide more frequent updates, there is no more missing API and no more deprecated functions. By default the text editors use the same colors:
|
Very helpful, my old UltraEdit lua.txt was old as hell. Nice job Mera :)
|
Heh, I've been updating my UltraEdit wordfile a lot lately just getting ready for LK -- stunned at how much has been added since Capnbry's file ages ago.
|
Very helpful, thank you.
I've been adding things to my own highlight file too but not a systematic effort. This is a definite timesaver :) |
At a glance I noticed one thing present in my personal file that's missing.
Maybe you'd like to add it. Near the top of the lua section after the /delimiters /function string lines I have Code:
/Open Fold Strings = "{" "function" "then" "else" "do" "until" "for" "while" (and comment blocks if you put '<<' and '>>' inside block section, especially handy for big comment blocks containing license, documentation etc) I also noticed in the keywords section there's 'UIParent'. Any reason for it? Another little detail, you could add ** -0 -1 -2 -3 -4 -5 -6 -7 -8 -9 as a substring to any of your Cx color code sections so that negative numbers are colored as well. (I usually make an extra color code group just for that but I see you've used the 8 allowed) Last little comment/question (sorry :p) I see a Code:
Block Comment On Alt = -- Does that take care of the limitation in UEdit regarding block/line comments that start with the same substring? To clarify, if you input the -- line comment, block comments break as UEdit stops processing the after '--' and '[[' part is ignored hence doesn't understand it's the beginning of a block comment instead treats it as a line comment. If the alternate block comment definition solves that; neat trick! If not I used to differentiate the 2 by making a Code:
Line Comment = --- that I run on my .lua files replacing occurrences of '--' with '---' on first pass and then '---[[' with '--[[' (to restore block comments). |
Thanks you all for the nice feedbacks I will of course update it to be even better with your help =)
Quote:
PHP Code:
//EDIT: I think I have found the glitch, with "for" and "do" on the same line it is looking for 2x "end" statements and then breaking the open/close function, should be patchable that, will look closely the help file to check for possible workarounds |
I think the patch for your code Dridzt is to not add "for" because for is always called with a "do", like having "if" already not present is fine because it's always coming with a "then" which is declared.
|
Quote:
For the same reason "while" must also be removed (it's always while () do) "repeat" is also missing along the same lines ("until" is defined). So that line should be Code:
/Open Fold Strings = "{" "function" "then" "else" "do" "until" |
Quote:
|
I have a 12.x.. that's probably it :)
|
I think that's why it fail on you because the highlight feature has changed since this old version
Quote:
not sure what you mean here but do you mean if I have a block like that for example --[[ line1 line2 --line3 line4 line5 ]] you mean if the "--" will break the full block and the block will stops at line3 instead of line5 ? if that what you mean I have tested and "--" does not break the full block and what is commented is from line1 to line5 2) Else I have got the idea to add another section like /C8"WoW Default Frames" to highlight the calls of blizzard frames like UIParent, DessupFrame etc etc, dunno if thats a good idea , maybe too much , will add more apis anyway I have to browse blizz files now |
Is there something like this for Notepad++? :)
|
I've updated this for the current wow 3.3 API and new uestudio wordfile format (.uew) but don't know where to upload it :)
PHP Code:
|
Thank you Dridzt Yet I dont play wow but I hope soon
Quote:
|
Quote:
Awesome! I would love to have all the updated API working with Notepad++! I use a primitive old list that is so out of date. This would be a god send :) |
Notepad++ is really easy:
(Thanks to p3lim) http://gist.github.com/280186 Should be enough. Hope this helps! EDIT: I should have added that you just replace the Lua portion in your langs.xml with this. :) |
Quote:
WOW thanks! |
The project has now moved to http://luawow.googlecode.com
The home page, helps and the zip are not yet finalized but you can download in advance syntaxes on the google subversion for Notepad++ UltraEdit PSPad and RjTextEd Notepad + + plugin is based on External lexers and GmodLua and I reworked the code so that the folding of Lua code performs better, you can now fold more lua instructions with a behavior similar to text editors of the best known. the list of API is divided into four groups in four groups now, 1) global functions 2) uiobject functions 3) ace2 constants 4) ace3 constants By default the text editors use the same colors. Any suggestion is welcome |
Fair warning. Using this with NP++ causes the client to slow down SIGNIFICANTLY. I'm not sure why.
|
This is not from the plugin Chaos this issue but the library the plugin is based on, Garthex already replied to my request
Quote:
I have caught this bug while adding 33000 entries into my file (function + variables) But actually LuaWoW uses ~5000 API functions in WoW and you should not notice speed issues or maybe your computer is slow too, here on a Core i7 and 12Gb DDR3 it's fast and I don't notice the speed issues, the client respond as normal. To summarize any actual syntax plugin is increasingly slow in the number of recognized functions, a workaround is to add the list to langs.xml but you will have less controls on your language and dirty folders. |
Quote:
|
you haven't noticed this in other languages because they are built in Notepad++ and they are not using the plugin libraries.
To resume the situation , all languages coming in an external plugin are yet slow, this is a bug from the plugin library, not the plugin itself. It affects GmodLua, LuaWoW, External Lexer KVS, Oberon-2 Lexer, and more.. all the one you see in the Plugin Manager are plugins affected by this issue. if the library is slow, all plugin languages based on it will be slow. We can only wait a patch to the library (scintilla) and don ho will include it then in Notepad++ and the language plugin will be faster. Of course this is not a failure of your computer but the fact that you've noticed it is slow with only 6000 words recognized is abnormal and I'm not sure the scintilla speed patch will be better for you. I suggest you invest in the i7 ;) |
Quote:
However, I'm not going to continue to sit here and be told how "inferior" my system is because it doesn't have an i7. There are plenty of other places with more qualified people where I can be told my system "sucks". Yes, I can read between the lines. What bothers me is how you've turned this into "my uber rig can run it, why can't yours? Oh, because it sucks." I have 3 options and I'll consider them all: 1) Wait for the miracle patch 2) Keep working with the standard lua as I have been to date 3) Shop around for another editor that meets my liking This will be my last response on the matter as I have the info I was looking for. I'll leave with this, more fuel to stroke your epeen with: CPU: AMD Phenom II X4 925 (2.8GHz, I don't OC as I'm not made of money if it fries) RAM: 8GB DDR3 I'll admit my comp isn't as uber. You win the thread. Good day. |
I normally don't do this, but ...
damn I have to ... I lol'ed! OK I admitted it. *feels better, trolls away* |
anyway this can be used on linux by gedit ?
|
ChaosInc Im at work testing on P4 (one core) 3Ghz, 2Gb RAm, its not slow at all, it just froze a few second at start after loading the file (which is normal all the file is parsed once at start) but after everything is fast I scroll down and up as fast on my i7
I really don't see where is the problem. |
Ok, I lied last post about it being my final one on the subject.
For the sake of argument, I've uninstalled N++ and all it's data (including the AppData) and did a full reinstall. It's performing a bit better, but still has a slight lag to it. However, it's more tolerable than it was before the reinstall. It was literally typing at one letter/second where now it's about a .1sec delay. I can work with this. Don't take my comments to date (other than the comp vs. comp reply, I still hold my ground on that) as any sort of personal attack. I, amongst others, appreciate the work put forth into it and now I can actually use it, making my code a bit easier to sort through. |
Just wanted to drop a line saying: Thank you Mera! I've been using a rather old and simple syntax highlighting definition for lua and your version really rocks! One question "Comment add/remove" (for multi-line code disablement) doesn't seem to work with it. It's not a biggie to enter --[[ ... ]] but I'm a creature of habit...
|
Tried out this plugin today, works great (though the colors are messed up on black background, but I can customize this as I see fit :))
Picture of it in action |
After using it for some while, I noticed a slight input lag.
As discussed earlier in this thread, it might just be the library issue. Just going to use standard Lua highlights for now :/ |
Notepad 5.8 is out with performance fixes in scintilla
Also Garthex did a very nice job updating its script for the new notepad, he kicked out external lexers and applied some performance tweaks I have upgraded the LuaWoW plugin with GmodLua 1.5 as a base and new scintilla 2.21 and notepad++ 5.8 as libraries at luawow.googlecode.com Btw this is redistributed for Notepad++ 5.8 UNICODE version, remove UNICODE and _UNICODE and recompile to get an ANSI version the source comes in a CodeBlocks project for a vc10 compiler 7-zip files published I haven't updated the APIs or I dont know if an update is needed because I play Warhammer online yet, this is funnier ;) :banana: |
LuaWoW works well for Notepad++ 5.8.
WoW APIs will need to be updated for Cataclysm, but that should be it. |
I didn't get a beta key too probably because my account is inactive :( I would have done otherwise
btw I have done the same for Warhammer online at luawarhammer.googlecode.com |
Quote:
|
Quote:
lua Code:
-- API extraction by Mera[eh]- Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ W:\WORLDO~1\BLIZZA~1\FrameXML\UI.xsd"> Code:
## Interface: 30300 //edit: got my key from Battle.net few days later so thanks to the mysterious helper if there is one, thanks to Curse so for sending me one too from the Curse shop. |
LuaWar + LuaWow projects API list updated to match latest clients
Wow: - API list extracted from Cataclysm beta 4.0.3.13277 - scanned some new uiobjects - new section added for notepad++ only, global tables (~20000 tables) War: - API update to 1.3.6.552 |
I use notepadd++ for ages and with the default Lua syntax highlighter in the default plugin repositories. Now my question is, what's the difference from the default one? I read the description, installed it but seen no difference other than taking a bit more time to load. This highlight things the default one doesn't or it actually has any way to auto-complete Blizzard API functions?
|
I just came across this after some googling around, gave it a try, and have to say it's awesome. Many thanks to Mera for what must've been a fair amount of labor. I've used the default Lua highlighting for quite awhile, and having the API stuff highlighted is magical. :D
|
I'm using Notepad++, and can't get user-controlled comment folding to work. It's supposed to be part of the GmodLua this is based off of.
At least this wiki page says Quote:
|
Quote:
|
UltraEdit/Studio wordfile for MoP beta (api extracted from build 15882)
http://pastebin.com/arCtrTZU Save as wowlua.uew in the wordfiles folder found from 'Advanced-> Configuration-> Editor Display-> Syntax Highlighting' in UltraEdit/Studio options. |
Thank you, Dridzt. It should be called "WoW Lua" instead of "WoW LUA" though. Yes, it's a nitpick.
|
any chance this will get updated anytime soon?
|
still no updates?
the current notepad++ hates the plugin keeps saying its to old |
It's been a year since you last necro-ed this thread, and it had been dead for a year before that, so I think it's safe to say that no, there are still no updates, and there aren't ever going to be any updates, so you should probably just give up already, unless you want to update the project yourself.
|
All times are GMT -6. The time now is 08:43 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI