Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tm4e-dev] TODO / FIXME comment markers

Hi,

Good question which was already requested without solution so far, but the way you asked here made it that it's the 1st time I can think of a "good enough" answer, so thanks for that ;)
In the context of LSP, there are semantic highlighting requests which allow to find which ranges are comments; then we can look for FIXME/TODO in those ranges and add the marker to the Eclipse model so it's visible as a Task. But support for semantic highlighting isn't common across Language Servers and I don't think LSP4E does support them well. So it's probably not the simplest nor most reliable way.
In the context of TM, you can get the parsed tokens and assciated ranges for a given file+grammar. I think you can crawl the parsing results, look for token with type name containing "comment" and assume those are comments, so you can look in them for FIXME/TODO.

Such a contribution would be highly appreciated in TM4E!

Cheers,

Back to the top