Last active
February 6, 2025 00:00
-
-
Save zeroidentidad/f3afd8e76eb2ef52496892dc94e4134e to your computer and use it in GitHub Desktop.
SublimeText + LSP-gopls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// Settings in here override those in "LSP-gopls/LSP-gopls.sublime-settings" | |
{ | |
"command": ["~/go/bin/gopls"], | |
"settings": { | |
"manageGoplsBinary": false, | |
"gopls.env": {"GOMODCACHE":"~/go/pkg/mod"}, | |
"gopls.directoryFilters": [ | |
"-**/node_modules", | |
"-**/vendor", | |
"-**/dist", | |
"-**/build", | |
"-**/.git", | |
"-**/docs" | |
], | |
"gopls.gofumpt": true, | |
"gopls.expandWorkspaceToModule": false, | |
"gopls.staticcheck": false, | |
"gopls.analyses": { | |
"embed": false, | |
"directive": false, | |
"buildtag": false, | |
"asmdecl": false, | |
"unusedparams": false, | |
"unreachable": false, | |
"nilness": false, | |
"shadow": false, | |
"fieldalignment": false | |
}, | |
"gopls.codelenses": { | |
"gc_details": false, | |
"regenerate_cgo": false, | |
"generate": false, | |
"test": false, | |
"tidy": false, | |
"upgrade_dependency": false, | |
"vendor": false, | |
"run_vulncheck_exp": false, | |
"run_govulncheck": false | |
}, | |
"gopls.matcher": "CaseInsensitive", | |
"gopls.analysisProgressReporting": false, | |
"gopls.completionBudget": "400ms", | |
"gopls.verboseOutput": false, | |
"gopls.usePlaceholders": true, | |
"gopls.experimentalPostfixCompletions": false, | |
"gopls.diagnosticsDelay": "2s", | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Settings in here override those in "LSP/LSP.sublime-settings" | |
{ | |
"lsp_format_on_save": true, | |
"clients": { | |
"gopls": { | |
"update_disable": true, | |
"enabled": true, | |
"command": ["~/go/bin/gopls"], | |
"selector": "source.go", | |
"initializationOptions": { | |
"gofumpt": true, | |
"usePlaceholders": true, | |
"completeUnimported": true | |
} | |
}, | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SublimeLinter Settings - User | |
{ | |
// "debug": true, | |
"linters": { | |
"golangcilint": { | |
"disable": false, | |
"args": [ | |
"--fast", | |
"--enable=gosec", | |
"--concurrency=2", | |
"--skip-dirs-use-default", | |
"--exclude-use-default", | |
"--max-issues-per-linter=50", | |
], | |
"executable": "~/go/bin/golangci-lint", | |
"lint_mode": "save", | |
"selectors": { | |
"go": "source.go" | |
}, | |
"env": { | |
"GOPATH": "~/go", | |
"PATH": "$PATH:~/go/bin" | |
} | |
} | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment