From 50c6f833b4fbbe1807bdcf7210fdab85de489200 Mon Sep 17 00:00:00 2001 From: Martin Azpillaga Aldalur Date: Thu, 2 Nov 2023 13:13:19 +0100 Subject: [PATCH] generate default entrypoint if it doesnt exist --- examples/entity | 2 +- examples/rpg | 2 +- .../languageserver/plugin/LanguageServerPlugin.kt | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/entity b/examples/entity index 13bc5a2..88f73b3 160000 --- a/examples/entity +++ b/examples/entity @@ -1 +1 @@ -Subproject commit 13bc5a21e2caec092ea2921e5fe8ca18a452b33f +Subproject commit 88f73b352e232ec4bb17ed3dcb8e91da0f2d83f8 diff --git a/examples/rpg b/examples/rpg index eb74799..42fb9a3 160000 --- a/examples/rpg +++ b/examples/rpg @@ -1 +1 @@ -Subproject commit eb747995caecb7e0f0f994a3c181131e9a70a1a0 +Subproject commit 42fb9a35653931bd90fa1eb7e7a840f8a44dc5be diff --git a/plugin/src/main/kotlin/com/strumenta/kolasu/languageserver/plugin/LanguageServerPlugin.kt b/plugin/src/main/kotlin/com/strumenta/kolasu/languageserver/plugin/LanguageServerPlugin.kt index 8f7be93..f0b8432 100644 --- a/plugin/src/main/kotlin/com/strumenta/kolasu/languageserver/plugin/LanguageServerPlugin.kt +++ b/plugin/src/main/kotlin/com/strumenta/kolasu/languageserver/plugin/LanguageServerPlugin.kt @@ -116,16 +116,14 @@ class LanguageServerPlugin : Plugin { package com.strumenta.${configuration.language}.languageserver import com.strumenta.${configuration.language}.parser.${configuration.language.capitalized()}KolasuParser - import com.strumenta.languageserver.KolasuServer - import com.strumenta.languageserver.ScopelessSymbolResolver + import com.strumenta.kolasu.languageserver.KolasuServer + import com.strumenta.kolasu.languageserver.ScopelessSymbolResolver - fun main(arguments: Array) { - val language = arguments[0] - val fileExtensions = arguments[1].split(",") + fun main() { + val parser = ${configuration.language.capitalized()}KolasuParser() val symbolResolver = ScopelessSymbolResolver() - val parser = ${configuration.language.capitalized()}KolasuParser() - val server = KolasuServer(parser, language, fileExtensions, symbolResolver) + val server = KolasuServer(parser, "${configuration.language}", listOf(${configuration.fileExtensions.joinToString(",") { "\"$it\"" }}), symbolResolver) server.startCommunication() } """.trimIndent()