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.
This is copied from the Euphoria mailing list:
I have posted the latest version of Geany support files and utility programs on the RDS User contribution page: http://www.rapideuphoria.com/eugeany.tar.gz . The Context Sensitive Help Program EuHelp http://openeuphoria.org/wiki/view/EuHelp.wc is included with the support files, together with a utility program called "gny.ex", which is used to backup the original lua support files and restore them, if desired. A "euphoria enabled" snippets file is also included.
All the support files and utility programs are contained in the directory " EuGeany http://openeuphoria.org/wiki/view/EuGeany.wc". Once you decompress the EuGeany http://openeuphoria.org/wiki/view/EuGeany.wc folder, all you have to do is run the program gny.ex to install and set the system up so you can swap lua/euphoria support whenever you wish.
IMPORTANT: you will need to edit the constants which reference FILEDEF_DIR, FILETYPE_EXT_DIR, and SNIPPETS_DIR before running gny.ex! The latest version of gny.ex is included below, but everything you need is contained in the EuGeany http://openeuphoria.org/wiki/view/EuGeany.wcdownload files.
Gny.ex is set up to translate/compile EuHelphttp://openeuphoria.org/wiki/view/EuHelp.wc.ex and gny.ex and then copy those programs to EUDIR/bin/ by default, but you can install those programs manually by setting the value of the constant COMPILE_INSTALL_EUHELP_GNY to FALSE. The path to EUDIR is set without using an environment variable
Comments, suggestions for improvements, etc. will be appreciated. I would deeply appreciate if anyone who is interested in extending Geany's support to languages not currently supported, would take a look at my method and providing any criticisms/comments/ suggestions for improvement. Euphoria is a very interesting language which is also very easy to learn. Even a novice programmer will be able to "read" the main program, "gny.ex" with no problem.
If you are interested in taking a closer look at Euphoria, the current version, Euphoria 4.05, for Linux and Windows, can be downloaded from http://openeuphoria.org/wiki/view/DownloadEuphoria.wc
More Euphoria resources are available at: The OpenEuphoria Forum: http://openeuphoria.org/forum/index.wc Euphoria 4.0.5 online manual: http://openeuphoria.org/docs/index.html
Regards, Ken Rhodes
https://www.facebook.com/home.php?ref=logo-- Kenneth Rhodes Ubuntu 12.1 100% MicroSoft Free!
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-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.
Cheers, Matthew Brush
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-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
Cheers, Matthew Brush
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
On 24 February 2013 11:47, Codger wolfmanjacques@gmail.com wrote:
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-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
Cheers, Matthew Brush _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/user
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.
Did you put a lexer_filetype=Lua in the filetypes.Euphoria.conf?
Cheers Lex
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 -- Kenneth Rhodes Ubuntu 12.1 100% MicroSoft Free!
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Le 24/02/2013 01:47, Codger a écrit :
[...]
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.
When you use a Custom Filetype (the filetype.Euphoria.conf thing), you need to set the lexer_filetype (and tag_parser too if you want) under the "settings" section. This tells Geany which lexer (the thing that styles the code) to use. In your case, set lexer_filetype=Lua and tag_parser=Lua and you should be done.
Regards, Colomban
SUCCESS! Thanks to Colomban, Lex, Matthew and all for the corrections.
I'll clean up the Euphoria support files and post it to the Geany Wiki.
Thanks again. Ken
On Sat, Feb 23, 2013 at 8:29 PM, Colomban Wendling < lists.ban@herbesfolles.org> wrote:
Le 24/02/2013 01:47, Codger a écrit :
[...]
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.
When you use a Custom Filetype (the filetype.Euphoria.conf thing), you need to set the lexer_filetype (and tag_parser too if you want) under the "settings" section. This tells Geany which lexer (the thing that styles the code) to use. In your case, set lexer_filetype=Lua and tag_parser=Lua and you should be done.
Regards, Colomban _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Le 24/02/2013 03:34, Codger a écrit :
SUCCESS! Thanks to Colomban, Lex, Matthew and all for the corrections.
No problem :)
I'll clean up the Euphoria support files and post it to the Geany Wiki.
Also, when creating a custom filetype, you generally want to inherit styles from the filetype you inherit the lexer from. E.g., in your case replacing the whole [styling] section with [styling=Lua].
That's not required of course, but it's less work for you and it's more future-proof (if new styles are added in the future, you'd automatically get them).
Regards, Colomban
Thanks again. :-)
Personally, I have decided not to inherit the Lua styling because I have customized the syntax coloring to my preference. I have posted a note to the Euphoria mailing list that suggesting that Lua's styling can be inherited as you have indicated. I have also encouraged Euphoria/Geany users to subscribe to this list.
On Sun, Feb 24, 2013 at 11:17 AM, Colomban Wendling < lists.ban@herbesfolles.org> wrote:
Le 24/02/2013 03:34, Codger a écrit :
SUCCESS! Thanks to Colomban, Lex, Matthew and all for the corrections.
No problem :)
I'll clean up the Euphoria support files and post it to the Geany Wiki.
Also, when creating a custom filetype, you generally want to inherit styles from the filetype you inherit the lexer from. E.g., in your case replacing the whole [styling] section with [styling=Lua].
That's not required of course, but it's less work for you and it's more future-proof (if new styles are added in the future, you'd automatically get them).
Regards, Colomban _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
I attempted to add Euphoria information to: http://wiki.geany.org/config/** start http://wiki.geany.org/config/start It appears that I have mucked up the page a bit by adding my whole file when I should have added a link to the file. I have a draft saved... what is the best way to recover?
Thanks in advance, Ken Rhodes
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/usershttps://lists.geany.org/cgi-bin/mailman/listinfo/users
On 13-02-26 11:54 AM, Codger wrote:
I attempted to add Euphoria information to: http://wiki.geany.org/config/** start http://wiki.geany.org/config/start It appears that I have mucked up the page a bit by adding my whole file when I should have added a link to the file. I have a draft saved... what is the best way to recover?
Probably to make the real page separately and just copy/paste markup you added from the main 'config' page to the subpage for Euphoria. There might be a way to revert but I didn't see it at a quick scan, maybe only "admins" can do it or something.
If you can't figure it out, ping me on IRC and I can try to fix it with my extremely limited Docuwikifu.
Cheers, Matthew Brush
On Tue, Feb 26, 2013 at 8:26 PM, Matthew Brush mbrush@codebrainz.ca wrote:
On 13-02-26 11:54 AM, Codger wrote:
I attempted to add Euphoria information to: http://wiki.geany.org/config/**** http://wiki.geany.org/config/** start <http://wiki.geany.org/config/**starthttp://wiki.geany.org/config/start
It appears that I have mucked up the page a bit by adding my whole file when I should have added a link to the file. I have a draft saved... what is the best way to recover?
Probably to make the real page separately and just copy/paste markup you added from the main 'config' page to the subpage for Euphoria. There might be a way to revert but I didn't see it at a quick scan, maybe only "admins" can do it or something.
If you can't figure it out, ping me on IRC and I can try to fix it with my extremely limited Docuwikifu.
Cheers, Matthew Brush ______________________________**_________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/usershttps://lists.geany.org/cgi-bin/mailman/listinfo/users
Ok... I think I have a kosher installation of Euphoria Custom Filetype https://wiki.geany.org/config/starton the proper page. Please advise me if need to do any further editing.
Thanks for all the help. :-)