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. |
All times are GMT -6. The time now is 09:19 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI