Sublime Text Package 安裝
GoSublime 在margo.go 註解改用LSP gopls // &golang.Gocode{ // // Whether or not to do gocode completion using source code // // instead of the pre-compiled package files. // // Using source is often slower but offer more up-to-date completions. // Source: true, // // show the function parameters. this can take up a lot of space // ShowFuncParams: true, // // whether or not to include Test*, Benchmark* and Example* functions in the auto-completion list // // gs: this replaces the `autocomplete_tests` setting // ProposeTests: false, // // whether or not builtin types and functions should be shown in the auto-completion list // // gs: this replaces the `autocomplete_builtins` setting // ProposeBuiltins: true, // }, golangci-lint 啟用這些檢查 &golang.Linter{Name: "golangci-lint", Args: []string{ "run", // 2019/10/29增加 "--enable=interfacer", "--enable=nakedret", "--enable=goconst", "--enable=bodyclose", "--enable=gocritic", "--enable=prealloc", "--enable=unconvert", "--enable=whitespace", "--enable=wsl", "--disable=deadcode", "--max-same-issues=0", "--fast", }},
LSP (gopls) 配置設定 { "auto_show_diagnostics_panel": "never", "show_diagnostics_in_view_status": false, "log_server": false, "clients": { "gopls": { "enabled": true } } } 還需要特別安裝 LSP-gopls套件