diff options
author | ichigo-gyuunyuu <[email protected]> | 2021-07-21 01:03:15 +0530 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-21 00:03:15 +0430 |
commit | 0064b446a02be13dba0f16f084e073b347716710 (patch) | |
tree | 203f9907132b86c37733096bd139cf224b4dd1ad /lua/lang/go.lua | |
parent | 9e640fa4d99beeec97292a00a51b335960aa2b0f (diff) |
[Feature] Allow for custom path to a language server binary (#1043)
Diffstat (limited to 'lua/lang/go.lua')
-rw-r--r-- | lua/lang/go.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/lang/go.lua b/lua/lang/go.lua index ee7a4df7..16b55ffb 100644 --- a/lua/lang/go.lua +++ b/lua/lang/go.lua @@ -11,6 +11,9 @@ M.config = function() "golangcilint", "revive", }, + lsp = { + path = DATA_PATH .. "/lspinstall/go/gopls", + }, } end @@ -40,7 +43,7 @@ end M.lsp = function() if not require("lv-utils").check_lsp_client_active "gopls" then require("lspconfig").gopls.setup { - cmd = { DATA_PATH .. "/lspinstall/go/gopls" }, + cmd = { O.lang.go.lsp.path }, settings = { gopls = { analyses = { unusedparams = true }, staticcheck = true } }, root_dir = require("lspconfig").util.root_pattern(".git", "go.mod"), init_options = { usePlaceholders = true, completeUnimported = true }, |