diff --git a/rider/src/main/kotlin/com/jetbrains/rider/plugins/godot/textMate/GdScriptTemplateContextType.kt b/rider/src/main/kotlin/com/jetbrains/rider/plugins/godot/textMate/GdScriptTemplateContextType.kt new file mode 100644 index 00000000..adb41dcb --- /dev/null +++ b/rider/src/main/kotlin/com/jetbrains/rider/plugins/godot/textMate/GdScriptTemplateContextType.kt @@ -0,0 +1,11 @@ +package com.jetbrains.rider.plugins.godot.textMate + +import com.intellij.codeInsight.template.TemplateActionContext +import com.intellij.codeInsight.template.TemplateContextType + +class GdScriptTemplateContextType : TemplateContextType("GdScript") { + + override fun isInContext(context: TemplateActionContext): Boolean = + context.editor?.virtualFile?.extension.equals("gd", true); + +} diff --git a/rider/src/main/resources/META-INF/plugin.xml b/rider/src/main/resources/META-INF/plugin.xml index cc07c36f..c145f91a 100644 --- a/rider/src/main/resources/META-INF/plugin.xml +++ b/rider/src/main/resources/META-INF/plugin.xml @@ -20,6 +20,8 @@ + + diff --git a/rider/src/main/resources/templates/GdScript.xml b/rider/src/main/resources/templates/GdScript.xml new file mode 100644 index 00000000..a63a9d8a --- /dev/null +++ b/rider/src/main/resources/templates/GdScript.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +