[MAC/OSX] Updated Fraise/Smultron lua.plist (Property list)
Posted: Tue Nov 23, 2010 10:08 am
Textmate BUNDLE with LOVE support (syntax, auto-complete, tooltips and other extras). However and fortunly MAC users have also other good choices with LUA support like TextWrangler, Fraise, even CODA (with some mods) and many others. Nice list of choices here
Was in ljdp thread intented to spread his love.bundle that I sugested also the possibility of use Fraise, an updated trunk of decesead SMULTRON for coding in LÖVE. However and thank's to Jascoco's feedback I discover that Lua syntax was incomplete in Fraise since the quick selection of Lua's functions as Jasoco noticed wasn't possible.
So, I investigated a bit Fraise package and discovered that Lua Syntax file could be improved. This thread is destined to the development and distribution of a new lua.plist file that improves Lua's/LÖVE's funcionality. Anyone interested is invited right away to give feedback and help in development of this syntax file.
HOW-TO:
If you browse Fraise.app package contents ("show package contents" in context menu) you can locate lua.plist in "Contents>Resources>Syntax Definitions" folder.
Replace the lua.plist in that folder by the one provided in this thread. Make a backup of lua.plist just in case.
Features:
- Function List is now activated
- Basic syntax LÖVE commands added (2nd degree/love.*)
To-do:
- Add full LÖVE syntax (3rd degree/love.*.*)
- Add LUA/LÖVE auto-complete syntax
Problems/Issues:
- Lua's and LOVE's commands of style "math.randomseed" don't are highlighted even if were already in syntax list. My guess is that "." scrambles with keyword detection. Spite of already added several commands for LÖVE they aren't being highlightned probably because of this issue. I will try to study a way of get around this previous bad implementation.
- Function List in Fraise now implemented but was a fast/dirty/guessing implementation watching other languages syntax in Fraise. Probably my "<string>\b(function)\s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]\w*)\s*\(([^)]*)\)</string> could be really accurated and corrected. But hey it works now.
- Since Fraise development is in a kind of hiatus probably is no good send this updated version to Fraise maintainer. Also there is the issue that we are adding LOVE syntax in pure LUA's syntax file (read first point)
Notes:
- Since LOVE use as code source .lua files there's isn't a clever way of tell Fraise that .lua file is after all a LÖVE file. Well, you can do that changing "SyntaxDefinitions" but all pure LUA files would be mistaken as LÖVE syntax too. Anyway that would not improve nothing only change status indicator that wasn't LUA syntax but LÖVE syntax
- I think this updated lua.plist will not screw your mac but any way "I will not take responsability for..." bla bla bla
- Anyone willing to help please do. Fraise PDF help file have a previous SMULTRON plist key reference.
Credits and Thanks
- Jasoco for discovering the Fraise bad Lua's support.
- ljdp for his bundle contributing for LÖVE support in OSX editors.
- all Mac users that I hope will comment or feedback in this thread.
- Fraise team and Smultron creator for his nice native COCOA editor.
Much of Mac/OSX users already know of awesome work of ljdp making a Was in ljdp thread intented to spread his love.bundle that I sugested also the possibility of use Fraise, an updated trunk of decesead SMULTRON for coding in LÖVE. However and thank's to Jascoco's feedback I discover that Lua syntax was incomplete in Fraise since the quick selection of Lua's functions as Jasoco noticed wasn't possible.
So, I investigated a bit Fraise package and discovered that Lua Syntax file could be improved. This thread is destined to the development and distribution of a new lua.plist file that improves Lua's/LÖVE's funcionality. Anyone interested is invited right away to give feedback and help in development of this syntax file.
HOW-TO:
If you browse Fraise.app package contents ("show package contents" in context menu) you can locate lua.plist in "Contents>Resources>Syntax Definitions" folder.
Replace the lua.plist in that folder by the one provided in this thread. Make a backup of lua.plist just in case.
Features:
- Function List is now activated
- Basic syntax LÖVE commands added (2nd degree/love.*)
To-do:
- Add full LÖVE syntax (3rd degree/love.*.*)
- Add LUA/LÖVE auto-complete syntax
Problems/Issues:
- Lua's and LOVE's commands of style "math.randomseed" don't are highlighted even if were already in syntax list. My guess is that "." scrambles with keyword detection. Spite of already added several commands for LÖVE they aren't being highlightned probably because of this issue. I will try to study a way of get around this previous bad implementation.
- Function List in Fraise now implemented but was a fast/dirty/guessing implementation watching other languages syntax in Fraise. Probably my "<string>\b(function)\s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]\w*)\s*\(([^)]*)\)</string> could be really accurated and corrected. But hey it works now.
- Since Fraise development is in a kind of hiatus probably is no good send this updated version to Fraise maintainer. Also there is the issue that we are adding LOVE syntax in pure LUA's syntax file (read first point)
Notes:
- Since LOVE use as code source .lua files there's isn't a clever way of tell Fraise that .lua file is after all a LÖVE file. Well, you can do that changing "SyntaxDefinitions" but all pure LUA files would be mistaken as LÖVE syntax too. Anyway that would not improve nothing only change status indicator that wasn't LUA syntax but LÖVE syntax
- I think this updated lua.plist will not screw your mac but any way "I will not take responsability for..." bla bla bla
- Anyone willing to help please do. Fraise PDF help file have a previous SMULTRON plist key reference.
Credits and Thanks
- Jasoco for discovering the Fraise bad Lua's support.
- ljdp for his bundle contributing for LÖVE support in OSX editors.
- all Mac users that I hope will comment or feedback in this thread.
- Fraise team and Smultron creator for his nice native COCOA editor.