Take label offets client capability into account

This commit is contained in:
Aleksey Kladov
2020-07-16 18:41:16 +02:00
parent 6da22ed975
commit e1e79cf064
3 changed files with 66 additions and 10 deletions

View File

@@ -127,6 +127,7 @@ pub struct ClientCapsConfig {
pub resolve_code_action: bool,
pub hover_actions: bool,
pub status_notification: bool,
pub signature_help_label_offsets: bool,
}
impl Config {
@@ -302,6 +303,15 @@ impl Config {
{
self.client_caps.code_action_literals = value;
}
if let Some(value) = doc_caps
.signature_help
.as_ref()
.and_then(|it| it.signature_information.as_ref())
.and_then(|it| it.parameter_information.as_ref())
.and_then(|it| it.label_offset_support)
{
self.client_caps.signature_help_label_offsets = value;
}
self.completion.allow_snippets(false);
if let Some(completion) = &doc_caps.completion {