I have projects with .yaml files that are someitme...
# intellij
d
I have projects with .yaml files that are someitmes Ansible playbooks, sometimes Kubernetes deploy manifests and someitmes other types of YAML files. If it want to overwrite the filetype associated, I have to choose a file-name pattern or shebang. Is it possible to define in a project 'this directory contains ansible stuff', 'this directory contains kubernetes stuff' or how should I handle this?
I could add a comment to my YAML files at the beginning and (mis)use it like a shebang - but that would only work for me, not for collaborating with others. How do you handle such situations?
s
filename pattern sounds like a good idea,
file.ansible.yaml
or something like this? I don't think you can define it per directory
d
E.g. a Kubernetes Manifest could be called <anything>.yaml. And when opening files from other people, I can also not depend on any content. So either I do not use any of the Kubernetes Inspections/Autocompletion for my Kubernetes YAML files or associate every yaml file with Kubernetes?
s
I think that IntelliJ has a some sort of mechanism to identify YAML/JSON/etc files according to a schema (for example, it knows to identify GitHub Action workflow YAML files). Maybe look into that?
d
Okay, I have to remove all my .yaml file type associations. THEN, when reinstalling the plugins, they detect the yaml files based on some heuristic. I see. I think handling filetype<->plugin associations could be handled better.
s
idk and file associations might be something handled internally? so idk if uninstalling plugins would work