https://kotlinlang.org logo
s

SrSouza

07/01/2020, 2:05 AM
Hi folks, can you help me with something about the IntelliJ and Scripts? I want to my script have the extension:
bk.kts
and I try to create a New File Action at the IntelliJ and my extension is beeing removed, any work around or there is a better way to do that?
Peek 2020-06-30 23-15.gif
Found I way, overriding
CreateFileFromTemplateAction.createFile
Copy code
override fun createFile(name: String, templateName: String, dir: PsiDirectory): PsiFile? {
        return super.createFile("$name.bk", templateName, dir)
    }
This is how I do it, there is anyway to achieve this same result? I think that this is kinda hack
i

ilya.chernikov

07/01/2020, 8:37 AM
I think it'd be better to ask in #intellij or maybe even directly the intellij sdk devs.