Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filetypes are not registered - no syntax highlighting in IDEs #9

Open
FractalizeR opened this issue May 1, 2015 · 2 comments
Open

Comments

@FractalizeR
Copy link

If you add this bundle to some editor, supporting many file extensions (like PHPStorm IDE for example), no syntax highlighting appears.

This happens, because the filetypes key in the file Syntaxes\Jinja Templates.tmLanguage is empty. I had to edit it to look like this to enable syntax highlighting of Ansible jinja templates in PHPStorm:

 <key>fileTypes</key>
    <array>
        <string>j2</string>
    </array>
@cristiroma
Copy link

Just to clarify for those coming like me from Google, you need to edit the file in this repository where you did the checkout as @FractalizeR (thanks!) said above, not .PHPStorm home directory or PHPStorm itself.

  1. Clone https://github.com/mitsuhiko/jinja2-tmbundle somewhere
  2. Edit Syntaxes\Jinja Templates.tmLanguage as above (replace )
  3. Add cloned repository folder to PHPStorm -> Settings -> Editor -> TextMate Bundles
  4. It should work now, but may be you will have to add “*.j2” to PHPStorm -> Settings -> Editor -> Filetypes -> Files supported via TextMate bundles

Excerpt from http://www.fractalizer.ru/frpost_900/enabling-ansible-jinja2-template-syntax-highlighting-in-phpstorm-and-other-editors/

@ppar
Copy link

ppar commented Mar 14, 2019

The above PR should fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants