From fe89bf911cbcd8cd7e18e0a1d38524e997e42927 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 3 Jan 2024 10:08:32 -0300 Subject: [PATCH] Allow bypassing typechecker (#960) --- package.json | 5 +++++ src/client.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8168b6c0a..385216ccf 100644 --- a/package.json +++ b/package.json @@ -307,6 +307,11 @@ "description": "This is a temporary setting for testing purposes, do not use it! Replace the custom bundle logic by bundler-compose.", "type": "boolean", "default": false + }, + "rubyLsp.bypassTypechecker": { + "description": "Ignores if the project uses a typechecker. Only intended to be used while working on the Ruby LSP itself", + "type": "boolean", + "default": false } } }, diff --git a/src/client.ts b/src/client.ts index b761321b3..d909db3f5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -31,10 +31,13 @@ function getLspExecutables( const branch: string = config.get("branch")!; const customBundleGemfile: string = config.get("bundleGemfile")!; const useBundlerCompose: boolean = config.get("useBundlerCompose")!; + const bypassTypechecker: boolean = config.get("bypassTypechecker")!; const executableOptions: ExecutableOptions = { cwd: workspaceFolder.uri.fsPath, - env, + env: bypassTypechecker + ? { ...env, RUBY_LSP_BYPASS_TYPECHECKER: "true" } + : env, shell: true, };