@@ -527,6 +527,7 @@ enum EditorKind {
527527 Helix ,
528528 Vim ,
529529 VsCode ,
530+ Zed ,
530531}
531532
532533impl EditorKind {
@@ -536,6 +537,7 @@ impl EditorKind {
5365372. Helix
5375383. Vim
5385394. VS Code
540+ 5. Zed
539541
540542Select which editor you would like to set up [default: None]: " ;
541543
@@ -552,6 +554,7 @@ Select which editor you would like to set up [default: None]: ";
552554 "2" | "helix" => return Ok ( Some ( EditorKind :: Helix ) ) ,
553555 "3" | "vim" => return Ok ( Some ( EditorKind :: Vim ) ) ,
554556 "4" | "vscode" => return Ok ( Some ( EditorKind :: VsCode ) ) ,
557+ "5" | "zed" => return Ok ( Some ( EditorKind :: Zed ) ) ,
555558 "" | "none" => return Ok ( None ) ,
556559 _ => {
557560 eprintln ! ( "ERROR: unrecognized option '{}'" , input. trim( ) ) ;
@@ -587,6 +590,9 @@ Select which editor you would like to set up [default: None]: ";
587590 "4eecb58a2168b252077369da446c30ed0e658301efe69691979d1ef0443928f4" ,
588591 "c394386e6133bbf29ffd32c8af0bb3d4aac354cba9ee051f29612aa9350f8f8d" ,
589592 ] ,
593+ EditorKind :: Zed => {
594+ & [ "bbce727c269d1bd0c98afef4d612eb4ce27aea3c3a8968c5f10b31affbc40b6c" ]
595+ }
590596 }
591597 }
592598
@@ -599,7 +605,7 @@ Select which editor you would like to set up [default: None]: ";
599605 EditorKind :: Emacs => ".dir-locals.el" ,
600606 EditorKind :: Helix => "languages.toml" ,
601607 EditorKind :: Vim => "coc-settings.json" ,
602- EditorKind :: VsCode => "settings.json" ,
608+ EditorKind :: VsCode | EditorKind :: Zed => "settings.json" ,
603609 } )
604610 }
605611
@@ -609,6 +615,7 @@ Select which editor you would like to set up [default: None]: ";
609615 EditorKind :: Helix => PathBuf :: from ( ".helix" ) ,
610616 EditorKind :: Vim => PathBuf :: from ( ".vim" ) ,
611617 EditorKind :: VsCode => PathBuf :: from ( ".vscode" ) ,
618+ EditorKind :: Zed => PathBuf :: from ( ".zed" ) ,
612619 }
613620 }
614621
@@ -619,6 +626,7 @@ Select which editor you would like to set up [default: None]: ";
619626 EditorKind :: Vim | EditorKind :: VsCode => {
620627 include_str ! ( "../../../../etc/rust_analyzer_settings.json" )
621628 }
629+ EditorKind :: Zed => include_str ! ( "../../../../etc/rust_analyzer_zed.json" ) ,
622630 }
623631 }
624632
0 commit comments