diff --git a/src/language_servers/kotlin_lsp.rs b/src/language_servers/kotlin_lsp.rs index 9089b62..ab50e30 100644 --- a/src/language_servers/kotlin_lsp.rs +++ b/src/language_servers/kotlin_lsp.rs @@ -69,7 +69,14 @@ fn download_from_teamcity(version: String) -> Result { let url = format!("https://download-cdn.jetbrains.com/kotlin-lsp/{version}/kotlin-{version}.zip"); let target_dir = format!("kotlin-lsp-{version}"); - let script_path = format!("{target_dir}/kotlin-lsp.sh"); + let (os, _arch) = zed_extension_api::current_platform(); + let script_path = format!( + "{target_dir}/kotlin-lsp.{extension}", + extension = match os { + zed::Os::Mac | zed::Os::Linux => "sh", + zed::Os::Windows => "cmd", + } + ); if !Path::new(&target_dir).exists() { zed::download_file( &url, diff --git a/test.kt b/test.kt new file mode 100644 index 0000000..777258a --- /dev/null +++ b/test.kt @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.android.downloadablefonts + +/** Constants class */ +internal object Constants { + + val WIDTH_DEFAULT = 100 + val WIDTH_MAX = 1000 + val WIDTH_MIN = 0 + + val WEIGHT_DEFAULT = 400 + val WEIGHT_MAX = 1000 + val WEIGHT_MIN = 0 + + val ITALIC_DEFAULT = 0f + val ITALIC_MAX = 1f + val ITALIC_MIN = 0f + val a = "asda" +}