unixwork / xnedit

A fast and classic X11 text editor, based on NEdit, with full unicode support and antialiased text rendering.
Other
82 stars 12 forks source link

Syntax Highlighting Patterns for OCaml #58

Closed lersek closed 2 years ago

lersek commented 3 years ago

Hi,

I developed these patterns yesterday, as I couldn't find any OCaml patterns for NEdit / XNEdit. I'm contributing them as a stand-alone OCaml.pats X-resources file (attached), to be used with the -import command line option.

Personally I'm pleased with these patterns, and I don't intend to polish them further. They've been developed from, and extensively verified against, the (seriously ambiguous) lexer rules at https://ocaml.org/manual/lex.html. The coverage is not 100% complete (for example, linenum-directive and quoted-string-id are not supported), but it's good enough for me.

The license is "GPL v2.0 only", same as the main NEdit / XNEdit license.

I don't intend to turn the attached resources file into an actual C-language patch (or github PR) for XNedit at this time; please consider turning the patterns into C source (i.e., "default patterns") yourself. If that's not acceptable, and you're also reluctant to ship (bundle) the patterns file as-is with XNEdit, then please feel free to reject this ticket. Thanks!

OCaml.pats.gz

unixwork commented 3 years ago

Hi,

thank you for contributing the pattern. I will integrate this into the next release (planned for September).

unixwork commented 2 years ago

OCaml highlighting is integrated into xnedit 1.4.0