mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Add a workspace config-based approach to reloading discovered projects.
This commit is contained in:
parent
91371494ee
commit
8d9bff0c74
4 changed files with 54 additions and 23 deletions
|
@ -3,10 +3,10 @@ import * as lc from "vscode-languageclient/node";
|
|||
import * as vscode from "vscode";
|
||||
import * as ra from "../src/lsp_ext";
|
||||
import * as Is from "vscode-languageclient/lib/common/utils/is";
|
||||
import { assert } from "./util";
|
||||
import { assert, log } from "./util";
|
||||
import * as diagnostics from "./diagnostics";
|
||||
import { WorkspaceEdit } from "vscode";
|
||||
import { Config, substituteVSCodeVariables } from "./config";
|
||||
import { Config, prepareVSCodeConfig } from "./config";
|
||||
import { randomUUID } from "crypto";
|
||||
|
||||
export interface Env {
|
||||
|
@ -95,7 +95,9 @@ export async function createClient(
|
|||
const resp = await next(params, token);
|
||||
if (resp && Array.isArray(resp)) {
|
||||
return resp.map((val) => {
|
||||
return substituteVSCodeVariables(val);
|
||||
return prepareVSCodeConfig(val, (key, cfg) => {
|
||||
cfg[key] = config.discoveredWorkspaces;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return resp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue