Automatically add files with *.eds extention to Ini file type
Answered
Hello,
I'm developing a custom language plugin, the development of the language support is going fine.
Additionally, I would like this plugin to automatically add files with the .eds extension to the file type INI, because the syntax of these files corresponds to the .ini file syntax.
I successfully added the Ini plugin as dependency, but I don't know how to add the *.eds files to the INI file type.
Thanks,
Andrea
Please sign in to leave a comment.
Andrea,
You have to define and register a FileType that will extend the existing IniFileType and then simply override the getDefaultExtension method providing your eds file extension.
Thanks for the reply,
While trying to apply your solution I found a slightly different approach.
I ended up creating my file type and passing the Ini language as parameter to its super constructor, I did not extend the Ini file type.
private EdsFileType() {super(IniLanguage.INSTANCE);
}
As a result, my .eds file type has ini syntax highlighting