Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2023-09

Testers needed for new configurable Highlighter in IDE (textmate based)

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Frb

The IDE can now load highlighter definition files containing textmate grammar. (mostly).

There are some items still missing
- nested grammar/language (include using a 2nd grammar) (todo)
- folding (todo)
- There is also no support for "injections" (just edit the grammar and copy the injection into the final place).

Known differences:
- The regex engine does not support the full range of operations. So some existing grammars may fail on that (or behave different).
- SynEdit does not store newlines chars => patterns matching "\n" must be changed to match "$" instead.

----------
Installation:

- Add the json file to PCP/usersessions/tml/
? Files will be loaded at IDE startup. IDE must be restarted to load new files.
- The IDE will show it in the highlighter list
? Or it will show it on the "color tml" page, if there is an error in the file

It is recommanded to edit/amend the files (if you copy existing grammars).
- to get text in the preview of the options, add (top level) either ? "sampleText": "foo bar some text"
? "sampleTextFile": "/foo/bar/file"
- simplify the naming. Existing files contain name like ????????? "name": "comment.block.pascal",
????????? "name": "comment.line.pascal",
? You may want to replace them, with one name for all comments (keep one dot, as it will detect "comment.*" for default colors). ????????? "name": "comment.pascal",

----------

Please test (if interested in the feature). Thanks

https://forum.lazarus.freepascal.org/index.php?topic=64590.new#new

Reply by email