mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-24 02:24:25 -05:00
Add gofumpt-tool.sh script and use it in VS Code
This commit is contained in:
Vendored
+3
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"gopls": {
|
||||
"formatting.gofumpt": true,
|
||||
"formatting.gofumpt": false,
|
||||
"ui.diagnostic.staticcheck": true,
|
||||
"ui.diagnostic.analyses": {
|
||||
// This list must match the one in .golangci.yml
|
||||
@@ -24,6 +24,8 @@
|
||||
},
|
||||
"go.alternateTools": {
|
||||
"golangci-lint-v2": "${workspaceFolder}/scripts/golangci-lint-shim.sh",
|
||||
"customFormatter": "${workspaceFolder}/scripts/gofumpt-tool.sh",
|
||||
},
|
||||
"go.lintTool": "golangci-lint-v2",
|
||||
"go.formatTool": "custom",
|
||||
}
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is used by VSCode; it is not very useful otherwise, since it's easy
|
||||
# enough to just run `go tool gofumpt` directly, or use `just format`.
|
||||
|
||||
set -e
|
||||
|
||||
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
repo_root=$(dirname "$script_dir")
|
||||
|
||||
cd "$repo_root"
|
||||
exec go tool gofumpt "$@"
|
||||
Reference in New Issue
Block a user