diff --git a/python3/vimspector/installer.py b/python3/vimspector/installer.py index b39398f..46a9e69 100644 --- a/python3/vimspector/installer.py +++ b/python3/vimspector/installer.py @@ -340,11 +340,12 @@ def WriteAdapters( all_adapters, to_file=None ): def InstallGeneric( name, root, gadget ): - extension = os.path.join( root, 'extension' ) + extension_path = gadget.get( 'extension_path', 'extension' ) + extension = os.path.join( root, extension_path ) for f in gadget.get( 'make_executable', [] ): MakeExecutable( os.path.join( extension, f ) ) - MakeExtensionSymlink( name, root ) + MakeExtensionSymlink( name, root, extension_path ) def InstallCppTools( name, root, gadget ): @@ -699,8 +700,8 @@ def ExtractZipTo( file_path, destination, format ): CheckCall( [ 'tar', 'zxvf', file_path ] ) -def MakeExtensionSymlink( name, root ): - MakeSymlink( name, os.path.join( root, 'extension' ) ), +def MakeExtensionSymlink( name, root, extension_path = 'extension' ): + MakeSymlink( name, os.path.join( root, extension_path ) ), def MakeSymlink( link, pointing_to, in_folder = None ): diff --git a/support/test/kotlin/.gitignore b/support/test/kotlin/.gitignore new file mode 100644 index 0000000..f8b92c3 --- /dev/null +++ b/support/test/kotlin/.gitignore @@ -0,0 +1,2 @@ +.gradle +build diff --git a/support/test/kotlin/.vimspector.json b/support/test/kotlin/.vimspector.json new file mode 100644 index 0000000..d2c2a63 --- /dev/null +++ b/support/test/kotlin/.vimspector.json @@ -0,0 +1,21 @@ +{ + "configurations": { + "kotlin-debug-adapter launch": { + "adapter": "cust_kotlin-debug-adapter", + "configuration": { + "request": "launch", + "projectRoot": "${workspaceFolder}", + "mainClass": "vimspector/test/ApplicationKt" + } + }, + "kotlin-debug-adapter attach": { + "adapter": "cust_kotlin-debug-adapter", + "configuration": { + "request": "attach", + "projectRoot": "${workspaceFolder}", + "hostName": "${hostName}", + "port": "${port}" + } + } + } +} diff --git a/support/test/kotlin/build.gradle.kts b/support/test/kotlin/build.gradle.kts new file mode 100644 index 0000000..e93c004 --- /dev/null +++ b/support/test/kotlin/build.gradle.kts @@ -0,0 +1,25 @@ +plugins { + kotlin("jvm") version "1.4.0" + + application +} + +repositories { + // Use jcenter for resolving dependencies. + // You can declare any Maven/Ivy/file repository here. + jcenter() +} + +dependencies { + // Align versions of all Kotlin components + implementation(platform("org.jetbrains.kotlin:kotlin-bom")) + + // Use the Kotlin JDK 8 standard library. + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") +} + +application { + // Define the main class for the application. + mainClassName = "vimspector.test.ApplicationKt" +} + diff --git a/support/test/kotlin/settings.gradle.kts b/support/test/kotlin/settings.gradle.kts new file mode 100644 index 0000000..8cbc5be --- /dev/null +++ b/support/test/kotlin/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "vimspector-test" diff --git a/support/test/kotlin/src/main/kotlin/vimspector/test/Application.kt b/support/test/kotlin/src/main/kotlin/vimspector/test/Application.kt new file mode 100644 index 0000000..99655da --- /dev/null +++ b/support/test/kotlin/src/main/kotlin/vimspector/test/Application.kt @@ -0,0 +1,5 @@ +package vimspector.test + +fun main(args: Array) { + println("Hello World!") +}