@@ -4,8 +4,8 @@ use log::error;
44use lsp_server:: Notification ;
55use lsp_types:: {
66 notification:: {
7- Cancel , DidChangeTextDocument , DidChangeWatchedFiles , DidOpenTextDocument ,
8- DidSaveTextDocument , Notification as lsp_notification,
7+ Cancel , DidChangeTextDocument , DidChangeWatchedFiles , DidCloseTextDocument ,
8+ DidOpenTextDocument , DidSaveTextDocument , Notification as lsp_notification, SetTrace ,
99 } ,
1010 CancelParams , NumberOrString ,
1111} ;
@@ -14,8 +14,8 @@ use serde::de::DeserializeOwned;
1414use crate :: context:: { ServerContext , ServerContextSnapshot } ;
1515
1616use super :: text_document:: {
17- on_did_change_text_document, on_did_change_watched_files, on_did_open_text_document ,
18- on_did_save_text_document,
17+ on_did_change_text_document, on_did_change_watched_files, on_did_close_document ,
18+ on_did_open_text_document , on_did_save_text_document, on_set_trace ,
1919} ;
2020
2121pub async fn on_notification_handler (
@@ -29,7 +29,9 @@ pub async fn on_notification_handler(
2929 . await
3030 . on_parallel :: < DidOpenTextDocument , _ , _ > ( on_did_open_text_document)
3131 . on_parallel :: < DidSaveTextDocument , _ , _ > ( on_did_save_text_document)
32+ . on_parallel :: < DidCloseTextDocument , _ , _ > ( on_did_close_document)
3233 . on_parallel :: < DidChangeWatchedFiles , _ , _ > ( on_did_change_watched_files)
34+ . on_parallel :: < SetTrace , _ , _ > ( on_set_trace)
3335 . finish ( ) ;
3436
3537 Ok ( ( ) )
@@ -41,10 +43,7 @@ pub struct NotificationDispatcher<'a> {
4143}
4244
4345impl < ' a > NotificationDispatcher < ' a > {
44- pub fn new (
45- notification : Notification ,
46- context : & ' a mut ServerContext ,
47- ) -> Self {
46+ pub fn new ( notification : Notification , context : & ' a mut ServerContext ) -> Self {
4847 NotificationDispatcher {
4948 notification : Some ( notification) ,
5049 context,
0 commit comments