lsp: Fill in a bunch of missing capabilities (#21924)

Also state explicitly that we do support UTF-16 encoding and nothing
else.

See also #19788

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-12-12 16:39:29 +01:00 committed by GitHub
parent 5d0e75dd73
commit 77d066200a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -608,6 +608,10 @@ impl LanguageServer {
root_uri: Some(root_uri.clone()), root_uri: Some(root_uri.clone()),
initialization_options: None, initialization_options: None,
capabilities: ClientCapabilities { capabilities: ClientCapabilities {
general: Some(GeneralClientCapabilities {
position_encodings: Some(vec![PositionEncodingKind::UTF16]),
..Default::default()
}),
workspace: Some(WorkspaceClientCapabilities { workspace: Some(WorkspaceClientCapabilities {
configuration: Some(true), configuration: Some(true),
did_change_watched_files: Some(DidChangeWatchedFilesClientCapabilities { did_change_watched_files: Some(DidChangeWatchedFilesClientCapabilities {
@ -644,6 +648,7 @@ impl LanguageServer {
will_rename: Some(true), will_rename: Some(true),
..Default::default() ..Default::default()
}), }),
apply_edit: Some(true),
..Default::default() ..Default::default()
}), }),
text_document: Some(TextDocumentClientCapabilities { text_document: Some(TextDocumentClientCapabilities {
@ -760,9 +765,11 @@ impl LanguageServer {
})), })),
window: Some(WindowClientCapabilities { window: Some(WindowClientCapabilities {
work_done_progress: Some(true), work_done_progress: Some(true),
show_message: Some(ShowMessageRequestClientCapabilities {
message_action_item: None,
}),
..Default::default() ..Default::default()
}), }),
general: None,
}, },
trace: None, trace: None,
workspace_folders: Some(vec![WorkspaceFolder { workspace_folders: Some(vec![WorkspaceFolder {
@ -776,6 +783,7 @@ impl LanguageServer {
} }
}), }),
locale: None, locale: None,
..Default::default() ..Default::default()
} }
} }