mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
parent
2bac1bdf17
commit
d07a85ed7e
1 changed files with 9 additions and 1 deletions
|
@ -1,9 +1,17 @@
|
|||
import { homedir } from 'os';
|
||||
import * as lc from 'vscode-languageclient';
|
||||
|
||||
import { window, workspace } from 'vscode';
|
||||
import { Config } from './config';
|
||||
import { Highlighter } from './highlighting';
|
||||
|
||||
function expandPathResolving(path: string) {
|
||||
if (path.startsWith('~/')) {
|
||||
return path.replace('~', homedir());
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
export class Server {
|
||||
public static highlighter = new Highlighter();
|
||||
public static config = new Config();
|
||||
|
@ -20,7 +28,7 @@ export class Server {
|
|||
}
|
||||
|
||||
const run: lc.Executable = {
|
||||
command: this.config.raLspServerPath,
|
||||
command: expandPathResolving(this.config.raLspServerPath),
|
||||
options: { cwd: folder }
|
||||
};
|
||||
const serverOptions: lc.ServerOptions = {
|
||||
|
|
Loading…
Reference in a new issue