Register extensions to plugin's file type

I have a custom Yaml plugin for Ansible and users are repeatedly trying to resolve the problem where .yml extension is not registered to plugin but to bundled Yaml - rendering plugin useless. Please guide to me correct scenario how I should work with it. My current (very wild) ideas:

1) Add some sort of project on-load scanner which checks files and directory structure to see if it is Ansible and force register .yml back to plugin.

2) Add some sort of project on-load scanner which checks files and directory structure to see if it is Ansible and adds "Ansible" facet. Don't now how it will help me yet.

3) Add Ansible as LanguageSubstitutor, so .yml files will appear as YAML but parsed as Ansible.

0

Hi Pavel,

How are you trying to register extension at the moment? Are you following these instructions http://www.jetbrains.org/intellij/sdk/docs/reference_guide/custom_language_support/registering_file_type.html?

 

0

I am. Problem it it's *.yml extension and it's already occupied by official YAML plugin.

0

LanguageSubstitutor seems to be the right approach.

0

请先登录再写评论。