@@ -106,41 +106,38 @@ impl GlobalState {
106
106
) ;
107
107
} ;
108
108
109
- if self . config . client_caps . dynamic_watched_files {
110
- let save_registration_options = lsp_types:: TextDocumentSaveRegistrationOptions {
111
- include_text : Some ( false ) ,
112
- text_document_registration_options : lsp_types:: TextDocumentRegistrationOptions {
113
- document_selector : Some ( vec ! [
114
- lsp_types:: DocumentFilter {
115
- language: None ,
116
- scheme: None ,
117
- pattern: Some ( "**/*.rs" . into( ) ) ,
118
- } ,
119
- lsp_types:: DocumentFilter {
120
- language: None ,
121
- scheme: None ,
122
- pattern: Some ( "**/Cargo.toml" . into( ) ) ,
123
- } ,
124
- lsp_types:: DocumentFilter {
125
- language: None ,
126
- scheme: None ,
127
- pattern: Some ( "**/Cargo.lock" . into( ) ) ,
128
- } ,
129
- ] ) ,
130
- } ,
131
- } ;
132
-
133
- let registration = lsp_types:: Registration {
134
- id : "textDocument/didSave" . to_string ( ) ,
135
- method : "textDocument/didSave" . to_string ( ) ,
136
- register_options : Some ( serde_json:: to_value ( save_registration_options) . unwrap ( ) ) ,
137
- } ;
138
-
139
- self . send_request :: < lsp_types:: request:: RegisterCapability > (
140
- lsp_types:: RegistrationParams { registrations : vec ! [ registration] } ,
141
- |_, _| ( ) ,
142
- ) ;
143
- }
109
+ let save_registration_options = lsp_types:: TextDocumentSaveRegistrationOptions {
110
+ include_text : Some ( false ) ,
111
+ text_document_registration_options : lsp_types:: TextDocumentRegistrationOptions {
112
+ document_selector : Some ( vec ! [
113
+ lsp_types:: DocumentFilter {
114
+ language: None ,
115
+ scheme: None ,
116
+ pattern: Some ( "**/*.rs" . into( ) ) ,
117
+ } ,
118
+ lsp_types:: DocumentFilter {
119
+ language: None ,
120
+ scheme: None ,
121
+ pattern: Some ( "**/Cargo.toml" . into( ) ) ,
122
+ } ,
123
+ lsp_types:: DocumentFilter {
124
+ language: None ,
125
+ scheme: None ,
126
+ pattern: Some ( "**/Cargo.lock" . into( ) ) ,
127
+ } ,
128
+ ] ) ,
129
+ } ,
130
+ } ;
131
+
132
+ let registration = lsp_types:: Registration {
133
+ id : "textDocument/didSave" . to_string ( ) ,
134
+ method : "textDocument/didSave" . to_string ( ) ,
135
+ register_options : Some ( serde_json:: to_value ( save_registration_options) . unwrap ( ) ) ,
136
+ } ;
137
+ self . send_request :: < lsp_types:: request:: RegisterCapability > (
138
+ lsp_types:: RegistrationParams { registrations : vec ! [ registration] } ,
139
+ |_, _| ( ) ,
140
+ ) ;
144
141
145
142
self . fetch_workspaces ( ) ;
146
143
0 commit comments