diff options
author | Seivan Heidari <[email protected]> | 2019-12-23 14:35:31 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-12-23 14:35:31 +0000 |
commit | b21d9337d9200e2cfdc90b386591c72c302dc03e (patch) | |
tree | f81f5c08f821115cee26fa4d3ceaae88c7807fd5 /crates/ra_lsp_server/src/caps.rs | |
parent | 18a0937585b836ec5ed054b9ae48e0156ab6d9ef (diff) | |
parent | ce07a2daa9e53aa86a769f8641b14c2878444fbc (diff) |
Merge branch 'master' into feature/themes
Diffstat (limited to 'crates/ra_lsp_server/src/caps.rs')
-rw-r--r-- | crates/ra_lsp_server/src/caps.rs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index eea0965ed..eeca67ee1 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs | |||
@@ -1,11 +1,12 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! Advertizes the capabilities of the LSP Server. |
2 | 2 | ||
3 | use lsp_types::{ | 3 | use lsp_types::{ |
4 | CodeActionProviderCapability, CodeLensOptions, CompletionOptions, | 4 | CodeActionProviderCapability, CodeLensOptions, CompletionOptions, |
5 | DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, GenericCapability, | 5 | DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, |
6 | ImplementationProviderCapability, RenameOptions, RenameProviderCapability, ServerCapabilities, | 6 | ImplementationProviderCapability, RenameOptions, RenameProviderCapability, |
7 | SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind, | 7 | SelectionRangeProviderCapability, ServerCapabilities, SignatureHelpOptions, |
8 | TextDocumentSyncOptions, TypeDefinitionProviderCapability, | 8 | TextDocumentSyncCapability, TextDocumentSyncKind, TextDocumentSyncOptions, |
9 | TypeDefinitionProviderCapability, WorkDoneProgressOptions, | ||
9 | }; | 10 | }; |
10 | 11 | ||
11 | pub fn server_capabilities() -> ServerCapabilities { | 12 | pub fn server_capabilities() -> ServerCapabilities { |
@@ -21,10 +22,14 @@ pub fn server_capabilities() -> ServerCapabilities { | |||
21 | completion_provider: Some(CompletionOptions { | 22 | completion_provider: Some(CompletionOptions { |
22 | resolve_provider: None, | 23 | resolve_provider: None, |
23 | trigger_characters: Some(vec![":".to_string(), ".".to_string()]), | 24 | trigger_characters: Some(vec![":".to_string(), ".".to_string()]), |
25 | work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, | ||
24 | }), | 26 | }), |
25 | signature_help_provider: Some(SignatureHelpOptions { | 27 | signature_help_provider: Some(SignatureHelpOptions { |
26 | trigger_characters: Some(vec!["(".to_string(), ",".to_string(), ")".to_string()]), | 28 | trigger_characters: Some(vec!["(".to_string(), ",".to_string()]), |
29 | retrigger_characters: None, | ||
30 | work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, | ||
27 | }), | 31 | }), |
32 | declaration_provider: None, | ||
28 | definition_provider: Some(true), | 33 | definition_provider: Some(true), |
29 | type_definition_provider: Some(TypeDefinitionProviderCapability::Simple(true)), | 34 | type_definition_provider: Some(TypeDefinitionProviderCapability::Simple(true)), |
30 | implementation_provider: Some(ImplementationProviderCapability::Simple(true)), | 35 | implementation_provider: Some(ImplementationProviderCapability::Simple(true)), |
@@ -40,10 +45,11 @@ pub fn server_capabilities() -> ServerCapabilities { | |||
40 | first_trigger_character: "=".to_string(), | 45 | first_trigger_character: "=".to_string(), |
41 | more_trigger_character: Some(vec![".".to_string(), ">".to_string()]), | 46 | more_trigger_character: Some(vec![".".to_string(), ">".to_string()]), |
42 | }), | 47 | }), |
43 | selection_range_provider: Some(GenericCapability::default()), | 48 | selection_range_provider: Some(SelectionRangeProviderCapability::Simple(true)), |
44 | folding_range_provider: Some(FoldingRangeProviderCapability::Simple(true)), | 49 | folding_range_provider: Some(FoldingRangeProviderCapability::Simple(true)), |
45 | rename_provider: Some(RenameProviderCapability::Options(RenameOptions { | 50 | rename_provider: Some(RenameProviderCapability::Options(RenameOptions { |
46 | prepare_provider: Some(true), | 51 | prepare_provider: Some(true), |
52 | work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, | ||
47 | })), | 53 | })), |
48 | document_link_provider: None, | 54 | document_link_provider: None, |
49 | color_provider: None, | 55 | color_provider: None, |