override fun createCommandLine()

in src/main/kotlin/co/huggingface/llmintellij/lsp/LlmLsLspServerDescriptor.kt [18:29]


    override fun createCommandLine(): GeneralCommandLine {
        val settings = LlmSettingsState.instance
        val binaryPath = downloadLlmLs(logger, settings.lsp.binaryPath, settings.lsp.version) ?: throw Error("llm-ls binary path is not set")
        settings.lsp.binaryPath = binaryPath
        return GeneralCommandLine().apply {
            exePath = binaryPath
            withParentEnvironmentType(GeneralCommandLine.ParentEnvironmentType.CONSOLE)
            withCharset(Charsets.UTF_8)
            withEnvironment("LLM_LOG_LEVEL", settings.lsp.logLevel)
            addParameter("--stdio")
        }
    }