mirror of https://github.com/lapce/lapce.git
Specify the workspace folder of the root uri if available
This commit is contained in:
parent
1008682d28
commit
efc2ec9237
|
@ -1311,11 +1311,16 @@ pub fn send_initialize<CB>(&self, root_uri: Option<Url>, on_init: CB)
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
let init_params = InitializeParams {
|
let init_params = InitializeParams {
|
||||||
process_id: Some(process::id()),
|
process_id: Some(process::id()),
|
||||||
root_uri,
|
root_uri: root_uri.clone(),
|
||||||
initialization_options: self.options.clone(),
|
initialization_options: self.options.clone(),
|
||||||
capabilities: client_capabilities,
|
capabilities: client_capabilities,
|
||||||
trace: Some(TraceValue::Verbose),
|
trace: Some(TraceValue::Verbose),
|
||||||
workspace_folders: None,
|
workspace_folders: root_uri.map(|uri| {
|
||||||
|
vec![WorkspaceFolder {
|
||||||
|
name: uri.as_str().to_string(),
|
||||||
|
uri,
|
||||||
|
}]
|
||||||
|
}),
|
||||||
client_info: None,
|
client_info: None,
|
||||||
root_path: None,
|
root_path: None,
|
||||||
locale: None,
|
locale: None,
|
||||||
|
|
Loading…
Reference in New Issue