mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Add sorbet vscode configuration
This commit is contained in:
parent
b26bf95288
commit
6badcd929c
15
.vscode/settings.json
vendored
15
.vscode/settings.json
vendored
@ -18,6 +18,21 @@
|
|||||||
"editor.formatOnType": true,
|
"editor.formatOnType": true,
|
||||||
"editor.semanticHighlighting.enabled": true,
|
"editor.semanticHighlighting.enabled": true,
|
||||||
},
|
},
|
||||||
|
"sorbet.enabled": true,
|
||||||
|
"sorbet.lspConfigs": [
|
||||||
|
{
|
||||||
|
"id": "default",
|
||||||
|
"name": "Brew Typecheck",
|
||||||
|
"description": "Default configuration",
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"command": [
|
||||||
|
"./bin/brew",
|
||||||
|
"typecheck",
|
||||||
|
"--lsp",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sorbet.selectedLspConfigId": "default",
|
||||||
"shellcheck.customArgs": [
|
"shellcheck.customArgs": [
|
||||||
"--shell=bash",
|
"--shell=bash",
|
||||||
"--enable=all",
|
"--enable=all",
|
||||||
|
@ -24,6 +24,8 @@ module Homebrew
|
|||||||
switch "--suggest-typed",
|
switch "--suggest-typed",
|
||||||
depends_on: "--update",
|
depends_on: "--update",
|
||||||
description: "Try upgrading `typed` sigils."
|
description: "Try upgrading `typed` sigils."
|
||||||
|
switch "--lsp",
|
||||||
|
description: "Start the Sorbet LSP server."
|
||||||
flag "--dir=",
|
flag "--dir=",
|
||||||
description: "Typecheck all files in a specific directory."
|
description: "Typecheck all files in a specific directory."
|
||||||
flag "--file=",
|
flag "--file=",
|
||||||
@ -33,6 +35,9 @@ module Homebrew
|
|||||||
"in their paths (relative to the input path passed to Sorbet)."
|
"in their paths (relative to the input path passed to Sorbet)."
|
||||||
|
|
||||||
conflicts "--dir", "--file"
|
conflicts "--dir", "--file"
|
||||||
|
conflicts "--lsp", "--update"
|
||||||
|
conflicts "--lsp", "--update-all"
|
||||||
|
conflicts "--lsp", "--fix"
|
||||||
|
|
||||||
named_args :none
|
named_args :none
|
||||||
end
|
end
|
||||||
@ -80,6 +85,15 @@ module Homebrew
|
|||||||
srb_exec << "--autocorrect"
|
srb_exec << "--autocorrect"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if args.lsp?
|
||||||
|
srb_exec << "--lsp"
|
||||||
|
if (watchman = which("watchman", ORIGINAL_PATHS))
|
||||||
|
srb_exec << "--watchman-path" << watchman
|
||||||
|
else
|
||||||
|
srb_exec << "--disable-watchman" unless which("watchman", ORIGINAL_PATHS)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
srb_exec += ["--ignore", args.ignore] if args.ignore.present?
|
srb_exec += ["--ignore", args.ignore] if args.ignore.present?
|
||||||
if args.file.present? || args.dir.present?
|
if args.file.present? || args.dir.present?
|
||||||
cd("sorbet") do
|
cd("sorbet") do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user