Sha256: 8ff94dfe8044e7ea33ebbc78582bd3abc73c6660122077f5d7544fe8d48d9892

Contents?: true

Size: 753 Bytes

Versions: 3

Compression:

Stored size: 753 Bytes

Contents

import { workspace } from 'vscode'

export function calcExecutionConfiguration() {
    const yodaPathEnv = process.env.YODA_EXECUTABLE_PATH
    const yodaPathConfiguration = workspace.getConfiguration("yoda").get("path") as (string | null);
    const command = yodaPathEnv || yodaPathConfiguration || 'yoda'

    return { command }
}

export function isCustomExecutionPathConfigured(): boolean {
    const yodaPathEnv = process.env.YODA_EXECUTABLE_PATH
    const yodaPathConfiguration = workspace.getConfiguration("yoda").get("path") as (string | null);

    return !!(yodaPathEnv || yodaPathConfiguration)
}

export function getTraceConfiguration(): string | null {
  return workspace.getConfiguration("yoda").get("trace.server") as (string | null);
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yoda-language-server-0.10.1 client/vscode/src/config.ts
yoda-language-server-0.10.0 client/vscode/src/config.ts
yoda-language-server-0.9.0 client/vscode/src/config.ts