File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
crates/rust-analyzer/src/bin Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,14 @@ fn try_main(flags: flags::RustAnalyzer) -> Result<()> {
7878 println ! ( "rust-analyzer {}" , rust_analyzer:: version( ) ) ;
7979 return Ok ( ( ) ) ;
8080 }
81- with_extra_thread ( "LspServer" , stdx:: thread:: QoSClass :: Utility , run_server) ?;
81+
82+ // rust-analyzer’s “main thread” is actually a secondary thread
83+ // with an increased stack size at the User Initiated QoS class.
84+ // We use this QoS class because any delay in the main loop
85+ // will make actions like hitting enter in the editor slow.
86+ // rust-analyzer does not block the editor’s render loop,
87+ // so we don’t use User Interactive.
88+ with_extra_thread ( "LspServer" , stdx:: thread:: QoSClass :: UserInitiated , run_server) ?;
8289 }
8390 flags:: RustAnalyzerCmd :: Parse ( cmd) => cmd. run ( ) ?,
8491 flags:: RustAnalyzerCmd :: Symbols ( cmd) => cmd. run ( ) ?,
You can’t perform that action at this time.
0 commit comments