44
55// TODO: check options for additional ideas <https://github.com/wakatime/wakatime-cli/blob/develop/USAGE.md#ini-config-file>
66
7- // TODO: implement debounding ourselves to avoid wkcli roundtrips
7+ // TODO: implement debouncing ourselves to avoid wkcli roundtrips
88// TODO: read wakatime config
99// TODO: do not log when out of dev folder
1010
11+ use ls_types:: { notification:: Notification as _, request:: Request as _, * } ;
1112use lsp_server:: { Connection , ExtractError , Message , Notification , Request , RequestId } ;
12- use lsp_types:: { notification:: Notification as _, request:: Request as _, * } ;
1313
1414/// Open the Wakatime web dashboard in a browser
1515const OPEN_DASHBOARD_ACTION : & str = "open_dashboard" ;
@@ -62,7 +62,7 @@ impl LanguageServer {
6262 info. name,
6363 info. version
6464 . as_ref( )
65- . map_or_else( || "unknown" , |version| version) ,
65+ . map_or_else( || "unknown" , |version| version. as_str ( ) ) ,
6666 // Plugin part
6767 self . user_agent,
6868 // Last part is the one parsed by `wakatime` servers
@@ -254,7 +254,7 @@ type CastResult<Payload, Type> = Result<Result<Payload, Type>, ExtractError<Type
254254
255255fn try_cast_r < R > ( req : Request ) -> CastResult < ( RequestId , R :: Params ) , Request >
256256where
257- R : lsp_types :: request:: Request ,
257+ R : ls_types :: request:: Request ,
258258 R :: Params : serde:: de:: DeserializeOwned ,
259259{
260260 match req. extract ( R :: METHOD ) {
@@ -266,7 +266,7 @@ where
266266
267267fn try_cast_n < N > ( notif : Notification ) -> CastResult < N :: Params , Notification >
268268where
269- N : lsp_types :: notification:: Notification ,
269+ N : ls_types :: notification:: Notification ,
270270 N :: Params : serde:: de:: DeserializeOwned ,
271271{
272272 match notif. extract ( N :: METHOD ) {
0 commit comments