3

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

Apperò
  • 41
  • 7
  • 1
    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 Feb 26 '17 at 22:46
  • Thank you Willem. Probably learning to use `vim` is a bit overkill for the task, though. – Apperò Feb 27 '17 at 09:31

5 Answers5

6

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

vahndi
  • 1,055
  • 8
  • 16
1

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

Chris Colbert
  • 868
  • 7
  • 12
0

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.

Apperò
  • 41
  • 7
0

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.

Till
  • 51
  • 1
  • 2
0

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