How does one add their own custom indentation properties?
Hi all,
I'm working on a language plugin, and I've implemented FileTypeIndentOptionsProvider, and it's showing up properly in the settings dialog (under Code Style --> General), but I'd like to add my own indentation properties to CodeStyleSettings.IndentOptions, and I can't see how to do it. Is this possible?
Thanks,
Kurt Christensen
Please sign in to leave a comment.
Hi, Kurt.
You should implement com.intellij.psi.codeSyle.CodeStyleSettingsProvider interface.Register your implementation in plugin.xml descriptor as
<codeStyleSettingsProvider language="MyLang" implementation="lang.formatting.settings.MyLangCodeStyleSettingsProvider"/>
Aporpriate settings should be stored in an inheritor of com.intellij.psi.codeStyle.CustomCodeStyleSettings class. To return your own configuration panel, override createPanel method of com.intellij.application.options.CodeStyleAbstractConfigurable class.
With best regards,
Ilya