How to disable YamlStructuralKeysCompletionContributor in a custom YAML-based plugin?

已回答

Hello JetBrains team,

I'm developing a custom IntelliJ IDEA plugin that depends on the built-in YAML plugin and utilizes yaml.meta.model for structure definition. My plugin has its own CompletionContributor implementation that provides domain-specific autocompletion suggestions.

However, I noticed that YamlStructuralKeysCompletionContributor  interferes with my completion provider. It suggests incorrect values that are not applicable to my plugin. I don't use JSON schemas.

Questions:
1. Is there any way to disable YamlStructuralKeysCompletionContributor in my plugin?
2. If not, could JetBrains introduce a mechanism to disable or customize this contributor?

I would appreciate any recommendations on how to solve this issue. Thanks in advance for your help!

Best regards,
Yury Brigadirenko
Concord plugin

1

See CompletionContributor javadoc entry “Q: I know more about my environment than the IDE does…”

but this is somewhat risky.

0

The YamlStructuralKeysCompletionContributor is designed to provide completion suggestions based on the YAML structure defined by yaml.meta.model. It's particularly useful when working with YAML files that have a predefined schema or structure, often derived from JSON schemas or custom meta-models. However, if your plugin defines its own domain-specific completion logic without relying on such schemas, this contributor can indeed produce unwanted suggestions. 

0

请先登录再写评论。