christoffer / pycharm-pyxl

IntelliJ Pyxl Extensions
MIT License
21 stars 3 forks source link

Cannot open file when it has # coding: pyxl not on the first line #24

Open ashtuchkin opened 8 years ago

ashtuchkin commented 8 years ago

When this plugin is installed in PyCharm 2016.1, you cannot open a file that has new line and then pyxl annotation, like this:


# coding: pyxl
... other stuff ..

I started to debug this and found that the problem is with the highlighting lexer - it returns tokens with gaps, specifically it returns "new line" at pos 0-1, then another "new line" at pos 14-15, skipping the coding string. My guess is that the problem is in lexer definition, but I don't have time to fix it for now. Maybe somebody else can do it.

ashtuchkin commented 8 years ago

Update: it actually doesn't work even if there's something in the first line, i.e.

#!/usr/bin/env python
# coding: pyxl
...