kevinsawicki / monokai

Monokai Atom Syntax theme
241 stars 133 forks source link

Syntax color is broken since Atom 1.32.0 due to Tree-Sitter integration #101

Open mdouchement opened 5 years ago

mdouchement commented 5 years ago

Tree-Sitter is the brand new syntax parser of Atom http://blog.atom.io/2018/10/23/atom-1-32.html

NB: Lot of syntax-themes from the community are broken too. https://github.com/atom/atom/issues?q=is%3Aissue+is%3Aopen+label%3Atree-sitter

(left: Atom 1.31.2 - right: Atom 1.32.0)

vs1 vs2
Dominik1799 commented 5 years ago

Did you find any solution to that problem? Is there any way to fix it?

mdouchement commented 5 years ago

Nope I didn't find any solution. Regenerating the theme does not change anything.

curl -LO http://www.monokai.nl/blog/wp-content/asdev/Monokai.tmTheme
apm init --theme monokai32 --convert Monokai.tmTheme
cd monokai32
apm link

I'm wondering if it is not a bug in https://github.com/atom/language-go

mdouchement commented 5 years ago

As a workaround, it's possible to disable Tree-Sitter and restore the old behavior. Uncheck the option Settings => Core => Use Tree Sitter Parsers

mdouchement commented 5 years ago

It's an Atom issue. Some improvements have been added in https://github.com/atom/atom/releases/tag/v1.32.1

gsmetal commented 5 years ago

It's not a bug in Atom since v1.32.1. They've added (https://github.com/atom/language-ruby/pull/244 for example) much more scopes in tree-sitter parser, which are simply not used in this theme. It should be updated to use them.