Geany highlighting of TODO / FIXME within comments

classic Classic list List threaded Threaded
6 messages Options
Ari
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Geany highlighting of TODO / FIXME within comments

Ari
Administrator
Hi - I'm trying to get Geany to highlight TODO and FIXME notes in red or with a different background.
I've been playing with filetypes.python but I can only geany to highlight TODO when not in a comment line.

Is there a way to do this?

I noticed there is a plugin that "collects" TODO tasks and it would be useful to me if it didn't require a "description" of the TODO, which I don't do in many cases, and of course, if it would somehow highlight the TODO/FIXME note.

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany] Geany highlighting of TODO / FIXME within comments

Dominic Hopf
Am Sonntag, den 21.03.2010, 20:36 -0800 schrieb Ari:
> Hi - I'm trying to get Geany to highlight TODO and FIXME notes in red or with
> a different background.
> I've been playing with filetypes.python but I can only geany to highlight
> TODO when not in a comment line.
>
> Is there a way to do this?
Maybe Ctrl-Shift-M is what you're searching for? :)

> I noticed there is a plugin that "collects" TODO tasks and it would be
> useful to me if it didn't require a "description" of the TODO, which I don't
> do in many cases, and of course, if it would somehow highlight the
> TODO/FIXME note.

Maybe such a feature could be implemented in the plugin. I'd suggest you
to file a feature request at sourceforge [1].

Best Regards,
Dominic

[1] http://sourceforge.net/tracker/?group_id=222729&atid=1056535

--
Dominic Hopf <[hidden email]>

http://dominichopf.de/

Key Fingerprint:
A7DF C4FC 07AE 4DDC 5CA0 BD93 AAB0 6019 CA7D 868D

_______________________________________________
Geany mailing list
[hidden email]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany] Geany highlighting of TODO / FIXME within comments

Lex Trotman


On 23 March 2010 05:41, Dominic Hopf <[hidden email]> wrote:
Am Sonntag, den 21.03.2010, 20:36 -0800 schrieb Ari:
> Hi - I'm trying to get Geany to highlight TODO and FIXME notes in red or with
> a different background.
> I've been playing with filetypes.python but I can only geany to highlight
> TODO when not in a comment line.
>
> Is there a way to do this?
Maybe Ctrl-Shift-M is what you're searching for? :)

> I noticed there is a plugin that "collects" TODO tasks and it would be
> useful to me if it didn't require a "description" of the TODO, which I don't
> do in many cases, and of course, if it would somehow highlight the
> TODO/FIXME note.

Maybe such a feature could be implemented in the plugin. I'd suggest you
to file a feature request at sourceforge [1].

Best Regards,
Dominic


I'd expect that this needs to be done in the scintilla language lexer, specifically the lexer needs to look for TODO within comments.  I presume you got it to work outside comments by setting TODO as a keyword, but lexers don't ignore keywords in comments, strings etc, after all thats the language definition :-)

In fact AFAIK no lexer looks for any structure within a comment.  A  plugin would be "fighting" the lexer to style that bit of text so I doubt it would work.

Cheers
Lex
[1] http://sourceforge.net/tracker/?group_id=222729&atid=1056535

--
Dominic Hopf <[hidden email]>

http://dominichopf.de/

Key Fingerprint:
A7DF C4FC 07AE 4DDC 5CA0 BD93 AAB0 6019 CA7D 868D

_______________________________________________
Geany mailing list
[hidden email]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany



_______________________________________________
Geany mailing list
[hidden email]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany] Geany highlighting of TODO / FIXME within comments

Enrico Tröger
On Tue, 23 Mar 2010 09:06:47 +1100, Lex wrote:


>> > I noticed there is a plugin that "collects" TODO tasks and it
>> > would be useful to me if it didn't require a "description" of the
>> > TODO, which I
>> don't
>> > do in many cases, and of course, if it would somehow highlight the
>> > TODO/FIXME note.
>>
>> Maybe such a feature could be implemented in the plugin. I'd suggest
>> you to file a feature request at sourceforge [1].

No need to, this behaviour is already implemented. Though I'd rather
suggest to use descriptions for TODO items as it would make them more
understandable, also for yourself when you read the code three weeks
later. But yes, this is a personal preference.

The latest version of the Addons plugin contains the old implementation
of the Tasks subplugin, it might be that this old implementation
doesn't take "empty" TODO items. But the current development version in
SVN does take them even without a description.


>I'd expect that this needs to be done in the scintilla language lexer,
>specifically the lexer needs to look for TODO within comments.  I
>presume you got it to work outside comments by setting TODO as a
>keyword, but lexers don't ignore keywords in comments, strings etc,

Little correction, lexers *do* ignore keywords in comments :).


>In fact AFAIK no lexer looks for any structure within a comment.  A
>plugin would be "fighting" the lexer to style that bit of text so I
>doubt it would work.

Completely right. This can't be done (in a sane way) in Geany. This has
to be supported by the Scintilla lexers.

Regards,
Enrico

--
Get my GPG key from http://www.uvena.de/pub.asc

_______________________________________________
Geany mailing list
[hidden email]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany

attachment0 (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany] Geany highlighting of TODO / FIXME within comments

Lex Trotman


2010/3/23 Enrico Tröger <[hidden email]>
On Tue, 23 Mar 2010 09:06:47 +1100, Lex wrote:


>> > I noticed there is a plugin that "collects" TODO tasks and it
>> > would be useful to me if it didn't require a "description" of the
>> > TODO, which I
>> don't
>> > do in many cases, and of course, if it would somehow highlight the
>> > TODO/FIXME note.
>>
>> Maybe such a feature could be implemented in the plugin. I'd suggest
>> you to file a feature request at sourceforge [1].

No need to, this behaviour is already implemented. Though I'd rather
suggest to use descriptions for TODO items as it would make them more
understandable, also for yourself when you read the code three weeks
later. But yes, this is a personal preference.

The latest version of the Addons plugin contains the old implementation
of the Tasks subplugin, it might be that this old implementation
doesn't take "empty" TODO items. But the current development version in
SVN does take them even without a description.


>I'd expect that this needs to be done in the scintilla language lexer,
>specifically the lexer needs to look for TODO within comments.  I
>presume you got it to work outside comments by setting TODO as a
>keyword, but lexers don't ignore keywords in comments, strings etc,

Little correction, lexers *do* ignore keywords in comments :).

Oops, re-connecting brain to fingers :-)
 


>In fact AFAIK no lexer looks for any structure within a comment.  A
>plugin would be "fighting" the lexer to style that bit of text so I
>doubt it would work.

Completely right. This can't be done (in a sane way) in Geany. This has
to be supported by the Scintilla lexers.

Regards,
Enrico

--
Get my GPG key from http://www.uvena.de/pub.asc

_______________________________________________
Geany mailing list
[hidden email]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany



_______________________________________________
Geany mailing list
[hidden email]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Ari
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany] Geany highlighting of TODO / FIXME within comments

Ari
Administrator
Thanks for the follow up. I see this is not gonna happen. I opened a feature request earlier today before reading this.
It would have been nice though, something like this from the emacs guys:

http://emacs-fu.blogspot.com/2008/12/highlighting-todo-fixme-and-friends.html

Cheers
Loading...