mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Applied code style of `npm run fix
`
This commit is contained in:
parent
915c079e26
commit
9fe3b36bda
1 changed files with 4 additions and 6 deletions
|
@ -12,19 +12,17 @@ export class Server {
|
||||||
public static start(
|
public static start(
|
||||||
notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]>
|
notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]>
|
||||||
) {
|
) {
|
||||||
|
|
||||||
// '.' Is the fallback if no folder is open
|
// '.' Is the fallback if no folder is open
|
||||||
// TODO?: Workspace folders support Uri's (eg: file://test.txt). It might be a good idea to test if the uri points to a file.
|
// TODO?: Workspace folders support Uri's (eg: file://test.txt). It might be a good idea to test if the uri points to a file.
|
||||||
let folder: string = '.';
|
let folder: string = '.';
|
||||||
if (workspace.workspaceFolders !== undefined) {
|
if (workspace.workspaceFolders !== undefined) {
|
||||||
|
folder = workspace.workspaceFolders[0].uri.fsPath.toString();
|
||||||
folder = workspace
|
|
||||||
.workspaceFolders[0].uri.fsPath
|
|
||||||
.toString();
|
|
||||||
|
|
||||||
if (workspace.workspaceFolders.length > 1) {
|
if (workspace.workspaceFolders.length > 1) {
|
||||||
// Tell the user that we do not support multi-root workspaces yet
|
// Tell the user that we do not support multi-root workspaces yet
|
||||||
window.showWarningMessage('Multi-root workspaces are not currently supported');
|
window.showWarningMessage(
|
||||||
|
'Multi-root workspaces are not currently supported'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue