Apperò
Apperò

Reputation: 41

How to get syntax highlighting for .enaml files in PyCharm?

I am trying to learn Enaml, which is an extension to the Python language that allows you to define hierarchical trees of objects used for graphical user interfaces.

Since enaml is a super-set of the Python language, its syntax can be different from Python's one and IDEs do not highlight it. Is there any way to get enaml-syntax highlighting in PyCharm? Or maybe in some other IDE?

(I know that the package 'enaml-pygments' exists, but I have no idea how to make it work for automatic enaml-syntax highlighting in an IDE.)

Upvotes: 3

Views: 653

Answers (5)

yahya almohajire
yahya almohajire

Reputation: 1

https://github.com/vahndi/pycharm-enaml-keywords

Open PyCharm Go to File, Import Settings..., browse to the .jar file and click OK Select All, OK

Upvotes: 0

Till
Till

Reputation: 51

I'm using Atom to work with Python/Enaml code. With the language-enaml package you get syntax highlighting plus some autoextension and docstring feature for Enaml (https://atom.io/packages/language-enaml). Add in git integration and packages like build-python to run you code from the editor and you have quite a nice IDE.

Upvotes: 0

vahndi
vahndi

Reputation: 1045

I've added most of the keywords to this repo which you can import into PyCharm:

Upvotes: 6

Apperò
Apperò

Reputation: 41

Today I found this settings menu that partially addresses the issue of adding any syntax to PyCharm: https://blog.jetbrains.com/idea/2010/09/custom-file-types-in-intellij-idea/

Unfortunately it captures only the most simple features of a syntax.

Upvotes: 0

Chris Colbert
Chris Colbert

Reputation: 868

There are highlighters for a few editors in the Enaml repo. Maybe one of them can be used by PyCharm: https://github.com/nucleic/enaml/tree/master/tools

Upvotes: 1

Related Questions