diff options
Diffstat (limited to 'crates/ra_lsp_server/src/caps.rs')
-rw-r--r-- | crates/ra_lsp_server/src/caps.rs | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs deleted file mode 100644 index c4711076c..000000000 --- a/crates/ra_lsp_server/src/caps.rs +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | //! Advertizes the capabilities of the LSP Server. | ||
2 | |||
3 | use lsp_types::{ | ||
4 | CallHierarchyServerCapability, CodeActionProviderCapability, CodeLensOptions, | ||
5 | CompletionOptions, DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, | ||
6 | ImplementationProviderCapability, RenameOptions, RenameProviderCapability, SaveOptions, | ||
7 | SelectionRangeProviderCapability, ServerCapabilities, SignatureHelpOptions, | ||
8 | TextDocumentSyncCapability, TextDocumentSyncKind, TextDocumentSyncOptions, | ||
9 | TypeDefinitionProviderCapability, WorkDoneProgressOptions, | ||
10 | }; | ||
11 | |||
12 | pub fn server_capabilities() -> ServerCapabilities { | ||
13 | ServerCapabilities { | ||
14 | text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions { | ||
15 | open_close: Some(true), | ||
16 | change: Some(TextDocumentSyncKind::Full), | ||
17 | will_save: None, | ||
18 | will_save_wait_until: None, | ||
19 | save: Some(SaveOptions::default()), | ||
20 | })), | ||
21 | hover_provider: Some(true), | ||
22 | completion_provider: Some(CompletionOptions { | ||
23 | resolve_provider: None, | ||
24 | trigger_characters: Some(vec![":".to_string(), ".".to_string()]), | ||
25 | work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, | ||
26 | }), | ||
27 | signature_help_provider: Some(SignatureHelpOptions { | ||
28 | trigger_characters: Some(vec!["(".to_string(), ",".to_string()]), | ||
29 | retrigger_characters: None, | ||
30 | work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, | ||
31 | }), | ||
32 | declaration_provider: None, | ||
33 | definition_provider: Some(true), | ||
34 | type_definition_provider: Some(TypeDefinitionProviderCapability::Simple(true)), | ||
35 | implementation_provider: Some(ImplementationProviderCapability::Simple(true)), | ||
36 | references_provider: Some(true), | ||
37 | document_highlight_provider: Some(true), | ||
38 | document_symbol_provider: Some(true), | ||
39 | workspace_symbol_provider: Some(true), | ||
40 | code_action_provider: Some(CodeActionProviderCapability::Simple(true)), | ||
41 | code_lens_provider: Some(CodeLensOptions { resolve_provider: Some(true) }), | ||
42 | document_formatting_provider: Some(true), | ||
43 | document_range_formatting_provider: None, | ||
44 | document_on_type_formatting_provider: Some(DocumentOnTypeFormattingOptions { | ||
45 | first_trigger_character: "=".to_string(), | ||
46 | more_trigger_character: Some(vec![".".to_string(), ">".to_string()]), | ||
47 | }), | ||
48 | selection_range_provider: Some(SelectionRangeProviderCapability::Simple(true)), | ||
49 | semantic_highlighting: None, | ||
50 | folding_range_provider: Some(FoldingRangeProviderCapability::Simple(true)), | ||
51 | rename_provider: Some(RenameProviderCapability::Options(RenameOptions { | ||
52 | prepare_provider: Some(true), | ||
53 | work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, | ||
54 | })), | ||
55 | document_link_provider: None, | ||
56 | color_provider: None, | ||
57 | execute_command_provider: None, | ||
58 | workspace: None, | ||
59 | call_hierarchy_provider: Some(CallHierarchyServerCapability::Simple(true)), | ||
60 | experimental: Default::default(), | ||
61 | } | ||
62 | } | ||