Hello,
I have installed geany 0.19 (*) mainly to use the new Custom filetypes feature; but cannot have it work. Below what I did for an Oberon filetype:
* In filetype_extensions.conf: added "Oberon=*.ob;".
* Created a filetype.oberon file with settings adapted from filetype.pascal and the additional followong lines in the [settings] section: tag_parser="pascal" lexer_filetype="pascal" (also tried without quotes)
* Created Oberon-specific data in menu Build/Set Build Commands.
Compilation works, which proves the filetype is taken into account; but syntax highlighting does not at all (all test remains in default style). Help/pointer welcome.
Also, I don't understand the respective roles of these 2 settings. Explanation/pointer welcome. I think there may be a short and clear running example for this new feature.
(*) On debian/ubuntu, one needs to first install intltool instead of preinstalled intltool-debian. ________________________________
vit esse estrany ☣
spir.wikidot.com
On Sun, 20 Jun 2010 14:50:17 +0200 spir denis.spir@gmail.com wrote:
Hello,
I have installed geany 0.19 (*) mainly to use the new Custom filetypes feature; but cannot have it work. Below what I did for an Oberon filetype:
In filetype_extensions.conf: added "Oberon=*.ob;".
Created a filetype.oberon file with settings adapted from filetype.pascal and the additional followong lines in the [settings] section: tag_parser="pascal" lexer_filetype="pascal"
(also tried without quotes)
- Created Oberon-specific data in menu Build/Set Build Commands.
Compilation works, which proves the filetype is taken into account; but syntax highlighting does not at all (all test remains in default style). Help/pointer welcome.
follow-up:
Still cannot have syntax highlighting (but can live with this issue for a while).
Another problem is that my compiler (obc) requires source files to have the extension '.m', and no way to change this. It seems geany associates '.*' with GNU Octave (can see this in the terminal when trying to run). Octave is not listed in filetype_extensions.conf, but '*.m' is associated there with Matlab. Strangely, my setting associating '*.m' with Oberon does not override the predefined association with Octave, even if I erase the entry about Matlab. How to workaround this issue?
Denis ________________________________
vit esse estrany ☣
spir.wikidot.com
On 20 June 2010 22:50, spir denis.spir@gmail.com wrote:
Hello,
I have installed geany 0.19 (*) mainly to use the new Custom filetypes feature; but cannot have it work. Below what I did for an Oberon filetype:
In filetype_extensions.conf: added "Oberon=*.ob;".
Created a filetype.oberon file with settings adapted from filetype.pascal and the additional followong lines in the [settings] section:
tag_parser="pascal" lexer_filetype="pascal"
I think in both cases this should be "Pascal"
(also tried without quotes)
- Created Oberon-specific data in menu Build/Set Build Commands.
Compilation works, which proves the filetype is taken into account; but syntax highlighting does not at all (all test remains in default style). Help/pointer welcome.
Also, I don't understand the respective roles of these 2 settings. Explanation/pointer welcome. I think there may be a short and clear running example for this new feature.
The lexer_filetype is the name of the parser used to generate the highlighting in the editor, this parser should be able to parse just the area around where the user is editing to minimise overhead whilst editing. It is part of Scintilla.
The tag_parser is the name of the parser used to generate symbols in the sidebar, this parser is only run when the file is saved and has to parse the whole file and create a hierarchical symbol table so its generally constructed differently to the other one.
Cheers Lex
(*) On debian/ubuntu, one needs to first install intltool instead of preinstalled intltool-debian. ________________________________
vit esse estrany ☣
spir.wikidot.com _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
[@ Lex: sorry for double-posting]
On Mon, 21 Jun 2010 08:29:53 +1000 Lex Trotman elextr@gmail.com wrote:
On 20 June 2010 22:50, spir denis.spir@gmail.com wrote:
Hello,
I have installed geany 0.19 (*) mainly to use the new Custom filetypes feature; but cannot have it work. Below what I did for an Oberon filetype:
In filetype_extensions.conf: added "Oberon=*.ob;".
Created a filetype.oberon file with settings adapted from filetype.pascal and the additional followong lines in the [settings] section:
tag_parser="pascal" lexer_filetype="pascal"
I think in both cases this should be "Pascal"
Capitalizing does not change anything (still no highlighting, and also no symbol list in side-panel: message "No tags found").
(also tried without quotes)
- Created Oberon-specific data in menu Build/Set Build Commands.
Compilation works, which proves the filetype is taken into account; but syntax highlighting does not at all (all test remains in default style). Help/pointer welcome.
Also, I don't understand the respective roles of these 2 settings. Explanation/pointer welcome. I think there may be a short and clear running example for this new feature.
The lexer_filetype is the name of the parser used to generate the highlighting in the editor, this parser should be able to parse just the area around where the user is editing to minimise overhead whilst editing. It is part of Scintilla.
The tag_parser is the name of the parser used to generate symbols in the sidebar, this parser is only run when the file is saved and has to parse the whole file and create a hierarchical symbol table so its generally constructed differently to the other one.
Thank you for this clear answer :-)
Cheers Lex
Denis ________________________________
vit esse estrany ☣
spir.wikidot.com
On Sun, 20 Jun 2010 14:50:17 +0200 spir denis.spir@gmail.com wrote:
Hello,
I have installed geany 0.19 (*) mainly to use the new Custom filetypes feature; but cannot have it work. Below what I did for an Oberon filetype:
In filetype_extensions.conf: added "Oberon=*.ob;".
Created a filetype.oberon file with settings adapted from filetype.pascal and the
Have you read the manual? you need to call the file filetypes.Foo.conf.
Compilation works, which proves the filetype is taken into account; but syntax highlighting does not at all (all test remains in default style). Help/pointer welcome.
Is the filetype listed in the Document menu? That is proof whether the filetype is added or not.
Regards, Nick
On Mon, 21 Jun 2010 13:16:55 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
- Created a filetype.oberon file with settings adapted from filetype.pascal and the
Have you read the manual?
No, I have no time to lose with reading ;-)
you need to call the file filetypes.Foo.conf.
Compilation works, which proves the filetype is taken into account; but syntax highlighting does not at all (all test remains in default style). Help/pointer welcome.
Is the filetype listed in the Document menu? That is proof whether the filetype is added or not.
Right, the type is listed there, I can set it to an Oberon file (this does not happen automagically, even if Oberon file extensions are listed in filetype_extensions.conf), compile, run: all fine. But there is still no syntax highlighting; the whole code appears in default style. But this is _my_ customized default, which means something is taken into account (files of unknown type are rendered with no style at all, black on white).
Denis ________________________________
vit esse estrany ☣
spir.wikidot.com
On Mon, 21 Jun 2010 15:00:13 +0200 spir denis.spir@gmail.com wrote:
On Mon, 21 Jun 2010 13:16:55 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
- Created a filetype.oberon file with settings adapted from filetype.pascal and the
Have you read the manual?
No, I have no time to lose with reading ;-)
That's why it doesn't work then ;-)
you need to call the file filetypes.Foo.conf.
Compilation works, which proves the filetype is taken into account; but syntax highlighting does not at all (all test remains in default style). Help/pointer welcome.
Is the filetype listed in the Document menu? That is proof whether the filetype is added or not.
Right, the type is listed there, I can set it to an Oberon file (this does not happen automagically, even if Oberon file extensions are listed in filetype_extensions.conf), compile, run: all fine.
The filetype detection should work if your .Name.conf matches a Name=*.name entry.
But there is still no syntax highlighting; the whole code appears in default style. But this is _my_ customized default, which means something is taken into account (files of unknown type are rendered with no style at all, black on white).
Your lexer and parser names must match an existing filetype.
Send me the file and I'll look at it. Also check the Genie custom filetype file.
Regards, Nick