Coc-jedi
coc.nvim wrapper for jedi-language-server
Custom executable command
문서에도 나와있지만 다음 코드를 참고하면 된다:
/*
* Get the jedi-language-server executable, along with its arguments.
* This function considers
* 1. user configuration (a command configured by user trumps everything)
* 2. binaries currently in the path
* 3. defaults provided in ./constants.ts
*/
export default function getJlsExecutable(
config: WorkspaceConfiguration
): JlsExecutable {
const command = config.get<string>('executable.command')
if (!command) {
return getJlsExecutableDefault()
}
const args = config.get<string[]>('executable.args', [])
return { command, args }
}
호출부는 다음과 같다:
export async function activate(context: ExtensionContext): Promise<void> {
const config = workspace.getConfiguration('jedi')
const isEnable = config.get<boolean>('enable', true)
if (!isEnable) {
return
}
const serverOptions = getJlsExecutable(config)
//...
}