How to make own custom plugin prioritize over the bundled Docker plugin when conflict?
I'm writing a custom plugin that recognize “azure.yaml” file, then mark with an icon and treat it as yaml file, as follows.
```java
public class AzureYamlFileType extends LanguageFileType {
public static final AzureYamlFileType INSTANCE = new AzureYamlFileType();
private AzureYamlFileType() {
super(YAMLLanguage.INSTANCE);
}
@Override
public @NonNls @NotNull String getName() {
return "Azure YAML";
}
@Override
public @NlsContexts.Label @NotNull String getDescription() {
return "Azure YAML configuration file";
}
@Override
public @NlsSafe @NotNull String getDefaultExtension() {
return "yaml";
}
@Override
public Icon getIcon() {
return AzureYamlIcons.FILE;
}
}
```
```
<extensions defaultExtensionNs="com.intellij">
<fileType name="Azure YAML"
implementationClass="com.toolkit.intellij.azd.filetype.AzureYamlFileType"
fieldName="INSTANCE"
fileNames="azure.yaml"/>
</extensions>
```
However, when I run this plugin in the IDEA with bundled Docker plugin enabled, the “azure.yaml” will be identified as Docker file (and marked with docker icon).
Is there any best practices to prioritize my custom plugin over the bundled Docker plugin, so that the “azure.yaml” can applied and recognized for the custom plugin.
请先登录再写评论。