2
votes

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.)

5
I guess vim will probably be able to highlight it, since vim can like almost anything. But vim is not really an IDE. It is a text editor.Willem Van Onsem
Thank you Willem. Probably learning to use vim is a bit overkill for the task, though.Apperò

5 Answers

6
votes

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

1
votes

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

0
votes

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.

0
votes

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.

0
votes

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