Page 1 of 1

Add syntax highlights for modern languages

PostPosted: Wed Jul 24, 2019 9:05 pm
by hfmm99
I love WinMerge, it's a great tool, and it's free, I am very grateful with the developers who did it.

But, it's very obsolete on the Syntax Highlights it supports. It doesn't even support Javascript, JSON, YAML. Or is there any way to add custom languages? I'd love to add one for GraphQL for example.

Can you please at least add support for Javascript/JSON?

Thanks.

Re: Add syntax highlights for modern languages

PostPosted: Wed Dec 04, 2019 4:45 pm
by dbague
hfmm99 wrote:"Or is there any way to add custom languages? ...
Can you please at least add support for Javascript/JSON?
...


I concur with all of op request. but emphasize that while the first request is considered or rejected, that the ones I quoted be considered anyway and the custom way in priority as likely most easy... i may be wrong about that.

Alternative questions, where are the syntax highlights language definitions available in the software file structure or registry? is is encrypted, or text? thanks you for your help.

Re: Add syntax highlights for modern languages

PostPosted: Fri Dec 27, 2019 12:18 pm
by jtuc
The only things about syntax highlighting which WinMerge allows users to configure is colors to use for various syntactic elements, and which of them to emphasize with a bold font. Everything else is hard-coded in C++.
The .js filename extension is associated with the Java highlighter. This works to some extent.
A more fundamental issue is scripts embedded in HTML pages. If this is your use case, you may want to try https://bitbucket.org/jtuc/winmerge2011.
WinMerge 2011 is also aware of JavaScript regular expression literals and template strings.
I plan to contribute the improvements to WinMerge 2.x, but I cannot tell if and when this will actually happen.