<br><br><div class="gmail_quote">On 15 October 2012 16:29, Jean-Max Reymond <span dir="ltr"><<a href="mailto:jmreymond@free.fr" target="_blank">jmreymond@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Le 15/10/2012 01:46, Lex Trotman a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On 15 October 2012 02:35, Jean-Max Reymond <<a href="mailto:jmreymond@free.fr" target="_blank">jmreymond@free.fr</a><br></div><div class="im">
<mailto:<a href="mailto:jmreymond@free.fr" target="_blank">jmreymond@free.fr</a>>> wrote:<br>
<br>
    Hi,<br>
    I have written a filetype for awk files but I have some troubles<br>
    with lexer_filetype<br>
<br>
    In order to work correctly, I have to add a line lexer_filetype=C<br>
    (whitout this line, nothing is colored). So, my keywords are<br>
    highligted  but the commentary does not work, only the C syntax is<br>
    highligted. What's wrong ?<br>
    Thanks for your tips,<br>
<br>
<br>
Hi,<br>
<br>
The lexer is the piece of code that parses your file to decide what<br>
colour each character should be, thats why you need to specify one.  The<br>
lexer_filetype=X says use the lexer that is used for filetype X. So that<br>
line tells your filetype to use the C lexer, so thats why only C<br>
comments are highlighted.  Note the C lexer is hard coded to C syntax,<br>
if you set the various comment settings in the filetype file they affect<br>
things like menu->edit->format->comment/<u></u>uncomment/toggle comment not the<br>
lexer.  I don't remember the awk details but I would think C is probably<br>
the nearest other language.<br>
<br>
The lexers are part of the Scintilla project whose editing widget we use<br></div>
(<a href="http://www.scintilla.org" target="_blank">www.scintilla.org</a> <<a href="http://www.scintilla.org" target="_blank">http://www.scintilla.org</a>>).  Unfortunately they<div class="im"><br>
don't have an awk specific one so someone would have to write one to get<br>
exact awk syntax colouration.<br>
</div></blockquote>
<br>
thanks for your answer.<br>
You're right that C is the nearest language so I use the lexer_filetype=C<br>
I is very surprising that comment_single=# in the [settings] section is overridden by lexer_filetype .<br></blockquote><div><br></div><div>It isn't overridden so much as ignored, the lexer is for a specific language, and for any language the comments are defined so the lexer doesn't need to look at any settings.  The lexer knows nothing about your attempt to (ab)use it for a similar language.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Now, I have to fix the Symbols tab which does not display the variables and functions<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Sadly the problem is similar, but this time with parsers from the Ctags project.  Those parsers find the symbols in open files that are shown in the symbols tab.  Again there isn't an Awk parser in Geany.</div>
<div><br></div><div>Cheers</div><div>Lex</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<br>
<br>
-- <br>
Jean-Max Reymond<br>
Éruption de l'Etna: <a href="http://jmreymond.free.fr/Etna2002" target="_blank">http://jmreymond.free.fr/<u></u>Etna2002</a><br>
______________________________<u></u>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.geany.org" target="_blank">Users@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/users" target="_blank">https://lists.geany.org/cgi-<u></u>bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>