support folder rename for initial request.

This commit is contained in:
ShuiRuTian 2021-01-08 17:49:13 +08:00
parent 5c2b0e0835
commit c08391ce32

View file

@ -77,14 +77,22 @@ pub fn server_capabilities(client_caps: &ClientCapabilities) -> ServerCapabiliti
will_create: None, will_create: None,
did_rename: None, did_rename: None,
will_rename: Some(FileOperationRegistrationOptions { will_rename: Some(FileOperationRegistrationOptions {
filters: vec![FileOperationFilter { filters: vec![
scheme: Some(String::from("file")), FileOperationFilter {
pattern: FileOperationPattern { scheme: Some(String::from("file")),
glob: String::from("**/*.rs"), pattern: FileOperationPattern {
matches: Some(FileOperationPatternKind::File), glob: String::from("**/*.rs"),
options: None, matches: Some(FileOperationPatternKind::File),
}, options: None,
}], },
FileOperationFilter {
scheme: Some(String::from("untitled")),
pattern: FileOperationPattern {
glob: String::from("**"),
matches: Some(FileOperationPatternKind::Folder),
options: None,
},
}],
}), }),
did_delete: None, did_delete: None,
will_delete: None, will_delete: None,