@@ -82,12 +82,6 @@ impl TechniqueLanguageServer {
8282 . method
8383 . as_str ( )
8484 {
85- "initialize" => {
86- let params: InitializeParams = from_value ( req. params ) ?;
87- let result = self . handle_initialize ( params) ?;
88- let response = Response :: new_ok ( req. id , result) ;
89- sender ( Message :: Response ( response) ) ?;
90- }
9185 "textDocument/formatting" => {
9286 let params: DocumentFormattingParams = from_value ( req. params ) ?;
9387 match self . handle_document_formatting ( params) {
@@ -136,8 +130,8 @@ impl TechniqueLanguageServer {
136130 . as_str ( )
137131 {
138132 "initialized" => {
139- let _params : InitializedParams = from_value ( notification. params ) ?;
140- self . handle_initialized ( ) ?;
133+ let params : InitializedParams = from_value ( notification. params ) ?;
134+ self . handle_initialized ( params ) ?;
141135 }
142136 "textDocument/didOpen" => {
143137 let params: DidOpenTextDocumentParams = from_value ( notification. params ) ?;
@@ -162,26 +156,12 @@ impl TechniqueLanguageServer {
162156 Ok ( ( ) )
163157 }
164158
165- fn handle_initialize (
166- & self ,
167- _params : InitializeParams ,
168- ) -> Result < InitializeResult , Box < dyn std:: error:: Error + Sync + Send > > {
169- info ! ( "Language Server initializing" ) ;
170-
171- Ok ( InitializeResult {
172- server_info : None ,
173- capabilities : ServerCapabilities {
174- text_document_sync : Some ( TextDocumentSyncCapability :: Kind (
175- TextDocumentSyncKind :: FULL ,
176- ) ) ,
177- document_formatting_provider : Some ( lsp_types:: OneOf :: Left ( true ) ) ,
178- ..Default :: default ( )
179- } ,
180- } )
181- }
182-
183- fn handle_initialized ( & self ) -> Result < ( ) , Box < dyn std:: error:: Error + Sync + Send > > {
184- info ! ( "Technique Language Server initialized" ) ;
159+ fn handle_initialized (
160+ & mut self ,
161+ _params : InitializedParams ,
162+ ) -> Result < ( ) , Box < dyn std:: error:: Error + Sync + Send > > {
163+ // Note: workspace folders are received in the initialize params, which are handled by
164+ // connection.initialize() in mod.rs. If we need workspace info, we should pass it from there.
185165 Ok ( ( ) )
186166 }
187167
0 commit comments