File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,13 @@ const STATUS_DECLINED: InstallStatus = "declined";
2525const STATUS_FAILED : InstallStatus = "failed" ;
2626
2727const AXS_BINARY = "$PREFIX/axs" ;
28- const TERMINAL_REQUIRED_MESSAGE = strings . terminal_required_message_for_lsp ;
28+
29+ function getTerminalRequiredMessage ( ) : string {
30+ return (
31+ strings ?. terminal_required_message_for_lsp ??
32+ "Terminal not installed. Please install Terminal first to use LSP servers."
33+ ) ;
34+ }
2935
3036interface LspError extends Error {
3137 code ?: string ;
@@ -610,8 +616,9 @@ export async function ensureServerRunning(
610616 isTerminalInstalled = Boolean ( await terminal ?. isInstalled ?.( ) ) ;
611617 } catch { }
612618 if ( ! isTerminalInstalled ) {
613- alert ( strings . error , TERMINAL_REQUIRED_MESSAGE ) ;
614- const unavailable : LspError = new Error ( TERMINAL_REQUIRED_MESSAGE ) ;
619+ const message = getTerminalRequiredMessage ( ) ;
620+ alert ( strings ?. error , message ) ;
621+ const unavailable : LspError = new Error ( message ) ;
615622 unavailable . code = "LSP_SERVER_UNAVAILABLE" ;
616623 throw unavailable ;
617624 }
You can’t perform that action at this time.
0 commit comments