mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-28 04:45:05 +00:00
fixing ts linting and rust test
This commit is contained in:
parent
bd2160f014
commit
072f69e4c1
4 changed files with 30 additions and 28 deletions
|
@ -1318,7 +1318,8 @@ fn sysroot_to_crate_graph(
|
||||||
let file_id = load(&sysroot[krate].root)?;
|
let file_id = load(&sysroot[krate].root)?;
|
||||||
|
|
||||||
let env = Env::default();
|
let env = Env::default();
|
||||||
let display_name = CrateDisplayName::from_canonical_name(sysroot[krate].name.clone());
|
let display_name =
|
||||||
|
CrateDisplayName::from_canonical_name(sysroot[krate].name.clone());
|
||||||
let crate_id = crate_graph.add_crate_root(
|
let crate_id = crate_graph.add_crate_root(
|
||||||
file_id,
|
file_id,
|
||||||
Edition::CURRENT,
|
Edition::CURRENT,
|
||||||
|
|
|
@ -34,11 +34,11 @@ export type Workspace =
|
||||||
| { kind: "Empty" }
|
| { kind: "Empty" }
|
||||||
| {
|
| {
|
||||||
kind: "Workspace Folder";
|
kind: "Workspace Folder";
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
kind: "Detached Files";
|
kind: "Detached Files";
|
||||||
files: vscode.TextDocument[];
|
files: vscode.TextDocument[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export function fetchWorkspace(): Workspace {
|
export function fetchWorkspace(): Workspace {
|
||||||
const folders = (vscode.workspace.workspaceFolders || []).filter(
|
const folders = (vscode.workspace.workspaceFolders || []).filter(
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import * as vscode from "vscode";
|
import * as vscode from "vscode";
|
||||||
import * as fspath from "path";
|
import * as fspath from "path";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import {CtxInit} from "./ctx";
|
import { CtxInit } from "./ctx";
|
||||||
import * as ra from "./lsp_ext";
|
import * as ra from "./lsp_ext";
|
||||||
import {FetchDependencyListResult} from "./lsp_ext";
|
import { FetchDependencyListResult } from "./lsp_ext";
|
||||||
|
|
||||||
export class RustDependenciesProvider
|
export class RustDependenciesProvider
|
||||||
implements vscode.TreeDataProvider<Dependency | DependencyFile> {
|
implements vscode.TreeDataProvider<Dependency | DependencyFile>
|
||||||
|
{
|
||||||
dependenciesMap: { [id: string]: Dependency | DependencyFile };
|
dependenciesMap: { [id: string]: Dependency | DependencyFile };
|
||||||
ctx: CtxInit;
|
ctx: CtxInit;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue