How to implement a code style with custom options and .editorconfig for common options?

Hi there,

I have an implementation of LanguageCodeStyleSettingsProvider where I override the LanguageCodeStyleProvider.useBaseLanguageCommonSettings method to support common options from .editorconfig together with the custom options for the language.

override fun useBaseLanguageCommonSettings(): Boolean = true

However, LanguageCodeStyleProvider is marked with @ApiStatus.Internal, so I’m not allowed anymore to override the method.

What are other options to achieve the results I get with the method? If I remove the override, then the common options from .editorconfig are ignored for my custom language.

Thank you in advance!
Maksim

I believe, I found an alternative implementation. You need to call consumer.showAllStandardOptions() by default, see the snippet below.

override fun customizeSettings(consumer: CodeStyleSettingsCustomizable, settingsType: SettingsType) {
  if (settingsType == SettingsType.LANGUAGE_SPECIFIC) {
    consumer.showCustomOption(...)
  } else {
    consumer.showAllStandardOptions()
  }
}

I’d appreciate if someone could confirm that independently :slight_smile: