On Sat, Feb 23, 2013 at 4:37 PM, Matthew Brush mbrush@codebrainz.ca wrote:
On 13-02-23 01:32 PM, Matthew Brush wrote:
On 13-02-23 11:57 AM, Codger wrote:
Greetings All,
This "kludge" may interest those who are interested in using Geany to edit source files in languages for which Geany has no native support.
I have managed to obtain a high degree of support for the Euphoria Programming Language, including syntax color and context sensitive help, by backing up the original lua support files/references in filetypes.lua, filetype_extensions.conf, and snippets.conf, and then editing the lua files/references to support Euphoria. Support for Lua can be swapped/restored back by executing a batch file type program, written in Euphoria, which overwrites the the euphoria enabled, files with the origninal Lua support files. In like manner, Euphoria support can be selected again by copying/overwriting the Lua enabled files with those supporting Euphoria.
TLDR; but you can make a custom filetype based on Lua's without clobbering the old one, there's some info in the manual: http://www.geany.org/manual/**current/index.html#custom-**filetypeshttp://www.geany.org/manual/current/index.html#custom-filetypes
The general idea goes something like this:
$ cp /usr/local/share/geany/**filetypes.lua \ /home/you/.config/geany/**filedefs/filetypes.Euphoria.**conf
And then edit the filetypes.Euphoria.conf file to customize keywords, settings, styles, etc. Then you need to add an extension to filetype_extensions.conf [Extensions] group:
Euphoria=*.eu;
And then add it to a [Groups] group in that same file:
Script=...;Euphoria;
Then after you restart all Geany instances you can have Lua and Euphoria side by side without having to choose which one is supported.
Forgot the last step, put it on Geany's Wiki :) http://wiki.geany.org/config/**start http://wiki.geany.org/config/start
Cheers, Matthew Brush ______________________________**_________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/userhttps://lists.geany.org/cgi-bin/mailman/listinfo/users
Perhaps I am doing something continually wrong, but I have not been able to get the approach you have outlined above, which is described in the manual to work - the syntax coloring does not work.
Let me be specific - the filetypes.lua file when edited to support Euphoria works very, very well - almost flawlessly (folding is a wee bit funky) When this file is copied to the filename filetypes.Euphoria.conf, and Geany is restarted, and Euphoria Source Code is selected from the Document/Set Filetypes/Scripting Languages menu - all text color reverts to black in files with the designated Euphoria extensions.
I am puzzled as to why the method you have described, which is also described in the Geany manual, apparently works for some type of language files, but not for Euphoria. I should also note that at least two other Euphoria user's have failed to obtain color syntax support for Euphoria files, except by editing the lua support files, as I have done.
I am attaching the file filetypes.Euphoria.conf which is what I use renamed as filetypes.lua, just in case you, or some one else familiar with Geany might find out what is going wrong where.
Your assistance is appreciated.
Regards, Ken Rhodes