File tree Expand file tree Collapse file tree
crates/emmylua_ls/src/handlers/inlay_hint Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -464,8 +464,8 @@ pub fn get_override_lsp_location(
464464 let document = semantic_model. get_document_by_file_id ( file_id) ?;
465465 let root = semantic_model. get_root_by_file_id ( file_id) ?;
466466 let node = syntax_id. to_node_from_root ( root. syntax ( ) ) ?;
467- let range = if let Some ( index_exor ) = LuaIndexExpr :: cast ( node. clone ( ) ) {
468- index_exor . get_index_name_token ( ) ?. text_range ( )
467+ let range = if let Some ( index_expr ) = LuaIndexExpr :: cast ( node. clone ( ) ) {
468+ index_expr . get_index_name_token ( ) ?. text_range ( )
469469 } else {
470470 node. text_range ( )
471471 } ;
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ pub fn inlay_hint(
3434 client_id : ClientId ,
3535) -> Option < Vec < InlayHint > > {
3636 let semantic_model = analysis. compilation . get_semantic_model ( file_id) ?;
37+ if !semantic_model. get_emmyrc ( ) . hint . enable {
38+ return Some ( vec ! [ ] ) ;
39+ }
40+
3741 build_inlay_hints ( & semantic_model, client_id)
3842}
3943
You can’t perform that action at this time.
0 commit comments