ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Dev Tools (https://www.esoui.com/forums/forumdisplay.php?f=173)
-   -   ESOLua - Sublime Text 3 Language File (https://www.esoui.com/forums/showthread.php?t=930)

Cpsgames 04/15/14 12:36 PM

ESOLua - Sublime Text 3 Language File
 
ESOLua for Sublime Text 3

Hello!

I love to use Sublime Text 3 for just about anything and when I noticed there wasn't a language file for ESO's lua, I decided to make one! It's simple and to the point, but it works for those who like the extra syntax highlighting on API functions, globals, etc..

Installation
Via Package Control:
The easiest method to install ESOLua is to use Package Control from within Sublime Text and search for "ESOLua". It'll quickly download, install, and keep it up to date for you!

Manual:
Download it and extract it into your packages folder. Or clone it from the BitBucket repo.

If you find anything wrong with the language file feel free to send me a message, start an issue on the repo, or send a pull request!

Thanks!

Saucy 04/15/14 09:25 PM

Saw it on Reddit as well, many thanks Cpsgames! :D

Cpsgames 04/15/14 10:13 PM

Thanks! I hope you can find it useful. :)

BadVolt 04/16/14 07:36 AM

Quote:

Originally Posted by Cpsgames (Post 4485)
ESOLua for Sublime Text 3

Hello!

I love to use Sublime Text 3 for just about anything and when I noticed there wasn't a language file for ESO's lua, I decided to make one! It's simple and to the point, but it works for those who like the extra syntax highlighting on API functions, globals, etc..

Installation
Via Package Control:
The easiest method to install ESOLua is to use Package Control from within Sublime Text and search for "ESOLua". It'll quickly download, install, and keep it up to date for you!

Manual:
Download it and extract it into your packages folder. Or clone it from the BitBucket repo.

If you find anything wrong with the language file feel free to send me a message, start an issue on the repo, or send a pull request!

Thanks!

Thanks! Very useful!

Ruimuuv 04/16/14 09:44 AM

Wonderful, thank you!

LilBudyWizer 04/25/14 08:35 PM

It isn't working for me for some reason with Sublime Text 3, but is with Sublime Text 2. I installed package control, added the repository, added the package, but I'm not getting the highlighting. Basically the same thing I did in Sublime Text 2 except the install of Package control is pasting a different string into the console. Since you refer to Sublime Text 3 I have to assume that's what you're using and it's working just fine for you. Perhaps it's having both 2 and 3 installed at the same time?

Saucy 04/25/14 09:17 PM

If you open a .lua file, look at the bottom right of Sublime Text. It probably say "Lua", no? Click on it and change to ESOLua.

Another way is to open your .lua file if not already, then go: View -> Syntax -> Open all current extension as... (and choose ESOLua).

Saucy 04/25/14 09:31 PM

On another note, if you're using SublimeLinter with the SublimeLinter-lua plugin.

You can add ESOLua to the syntax_map (so it runs the lua-linter in ESOLua language file as well).

If you have both installed (easiest done by Package Control), go to the settings:
  1. Preferences -> Package Settings -> SublimeLinter -> Settings-User
  2. Inside the "syntax_map object, add to the list:
    Code:

    "esolua": "lua"
  3. Restarting Sublime Text might be needed

LilBudyWizer 04/26/14 03:46 AM

Yep, that was it. Sublime is a lot to take in, but easy to use. That makes it a whole lot easier to read the code.

LilBudyWizer 04/26/14 10:20 AM

Personally, I thank you as much for pointing me towards Sublime Text 3 as for the language file. There's a lot to learn to fully use it, but it seems a great boon knowing nothing about it. It's intuitive to start. I particularly like that open directory feature. I was using SciTE which works well enough, but this is a whole lot better. One thing that would be better is seeing the parameter list on functions. Since I don't get it on the string and table libraries I assume that's just not something Sublime Text 3 does, or at least not for LUA.

Saucy 04/26/14 01:08 PM

I've been looking for something similar, but haven't found any plugins that let you view the parameters of functions.
If I can't remember the functions params I run CTRL+R (Goto -> Goto Symbol), and it lets me search through all functions I've written.

About the string and table libraries; the closest I've found is Lua Love plugin. I haven't played with it much, but it seems to have most functions in there. Don't forget to change language file to "Lua (Love)", but I some functions work with ESOLua.

If all else fails, you can always define your own snippets. :)

*Edit: btw, I made snippets for LibAddonMenu for Sublime, located here: https://github.com/Saucyboy/sublime-ESO-LibAddonMenu

LilBudyWizer 04/28/14 01:17 PM

I put out a simple addon, EPA, for checking for inadvertent creation of globals. Someone pointed out you can use luac to do that. Being new to sublime I don't know if you can get sublimelinter-lua to highlight global creation, but it seems it would certainly be possible in a package. Since you already created a package perhaps you would be interested in doing this. Perhaps even a sublimelinter-ESOlua that warns about calls to private/protected functions as well.

Seerah 04/28/14 02:58 PM

http://www.wowinterface.com/download...OTANADDON.html

:)

Cpsgames 04/30/14 10:46 AM

Whoops, I was a bit late! I'm glad that you got the issues sorted, LilBudyWizer!

stjobe 05/11/14 03:47 PM

Sublime Text 3 + EsoLua + SublimeLinter just replaced Notepad++ for my ESO addon writing.

Thank you all for letting me know about ESOLua and SublimeLinter (ST3 was slowly replacing NP++ anyway, but this made the transition much easier and faster).

syndicated 05/22/14 09:24 PM

This is fantastic, thanks!

Cpsgames 05/25/14 07:41 PM

Thanks! Glad it could be of use!

haggen 07/29/15 09:44 AM

Quote:

Originally Posted by Cpsgames (Post 4485)
ESOLua for Sublime Text 3

Hello!

I love to use Sublime Text 3 for just about anything and when I noticed there wasn't a language file for ESO's lua, I decided to make one! It's simple and to the point, but it works for those who like the extra syntax highlighting on API functions, globals, etc..

Installation
Via Package Control:
The easiest method to install ESOLua is to use Package Control from within Sublime Text and search for "ESOLua". It'll quickly download, install, and keep it up to date for you!

Manual:
Download it and extract it into your packages folder. Or clone it from the BitBucket repo.

If you find anything wrong with the language file feel free to send me a message, start an issue on the repo, or send a pull request!

Thanks!

I hope you don't mind, but I ported your excellent work to Atom.

Source: https://github.com/haggen/language-eso-lua
Atom package: https://atom.io/packages/language-eso-lua

And of course I gave you your deserved credits, is that okay ?

Cpsgames 08/08/15 03:59 PM

Glad you were able to do something with it! Just a heads up, the version of the API I based this on is pretty out of date by now. I'm not sure how much the API has changed since then. I should probably update this...

I do not need any credit, I really don't mind! If you absolutely must give credit I'd prefer it if you just linked to the repo itself. I haven't used that Twitter account in ages. :P


All times are GMT -6. The time now is 11:17 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI