@@ -38,7 +38,7 @@ use crate::{
3838 } ,
3939 diagnostics:: DiagnosticTask ,
4040 from_json,
41- req:: { self , Decoration , InlayHint , InlayHintsParams } ,
41+ req:: { self , InlayHint , InlayHintsParams } ,
4242 semantic_tokens:: SemanticTokensBuilder ,
4343 world:: WorldSnapshot ,
4444 LspError , Result ,
@@ -389,15 +389,6 @@ pub fn handle_runnables(
389389 Ok ( res)
390390}
391391
392- pub fn handle_decorations (
393- world : WorldSnapshot ,
394- params : TextDocumentIdentifier ,
395- ) -> Result < Vec < Decoration > > {
396- let _p = profile ( "handle_decorations" ) ;
397- let file_id = params. try_conv_with ( & world) ?;
398- highlight ( & world, file_id)
399- }
400-
401392pub fn handle_completion (
402393 world : WorldSnapshot ,
403394 params : req:: CompletionParams ,
@@ -970,15 +961,6 @@ pub fn publish_diagnostics(world: &WorldSnapshot, file_id: FileId) -> Result<Dia
970961 Ok ( DiagnosticTask :: SetNative ( file_id, diagnostics) )
971962}
972963
973- pub fn publish_decorations (
974- world : & WorldSnapshot ,
975- file_id : FileId ,
976- ) -> Result < req:: PublishDecorationsParams > {
977- let _p = profile ( "publish_decorations" ) ;
978- let uri = world. file_id_to_uri ( file_id) ?;
979- Ok ( req:: PublishDecorationsParams { uri, decorations : highlight ( & world, file_id) ? } )
980- }
981-
982964fn to_lsp_runnable (
983965 world : & WorldSnapshot ,
984966 file_id : FileId ,
@@ -1008,21 +990,6 @@ fn to_lsp_runnable(
1008990 } )
1009991}
1010992
1011- fn highlight ( world : & WorldSnapshot , file_id : FileId ) -> Result < Vec < Decoration > > {
1012- let line_index = world. analysis ( ) . file_line_index ( file_id) ?;
1013- let res = world
1014- . analysis ( )
1015- . highlight ( file_id) ?
1016- . into_iter ( )
1017- . map ( |h| Decoration {
1018- range : h. range . conv_with ( & line_index) ,
1019- tag : h. highlight . to_string ( ) ,
1020- binding_hash : h. binding_hash . map ( |x| x. to_string ( ) ) ,
1021- } )
1022- . collect ( ) ;
1023- Ok ( res)
1024- }
1025-
1026993pub fn handle_inlay_hints (
1027994 world : WorldSnapshot ,
1028995 params : InlayHintsParams ,
0 commit comments