SpartanJ / ecode

Lightweight multi-platform code editor designed for modern hardware with a focus on responsiveness and performance.
MIT License
911 stars 13 forks source link

[Bug] CMake keywords as substrings in larger text still highlighted #204

Open ghost opened 5 months ago

ghost commented 5 months ago

For example, keyword EXPR and TYPE in https://github.com/AdeptLanguage/Adept/blob/master/CMakeLists.txt

p/s: Is it a solvable problem? Github's syntax highlighter suffered the same problem.

SpartanJ commented 5 months ago

With pattern-based highlighters is really tricky to solve it. Depends basically on the case. For this particular case I don't see any quick fix for the moment. It seems that it's tricky to parse CMake since I found highlighting errors using that file on all editors (but not all with this same issue). Some do a nice job, Kate seems to do the best job and it's pattern based, so it's possible (lang definition here).