aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/gopls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/gopls.lua')
-rw-r--r--lua/lspconfig/gopls.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/lua/lspconfig/gopls.lua b/lua/lspconfig/gopls.lua
new file mode 100644
index 00000000..08eacc15
--- /dev/null
+++ b/lua/lspconfig/gopls.lua
@@ -0,0 +1,23 @@
+local configs = require 'lspconfig/configs'
+local util = require 'lspconfig/util'
+
+configs.gopls = {
+ default_config = {
+ cmd = {"gopls"};
+ filetypes = {"go", "gomod"};
+ root_dir = util.root_pattern("go.mod", ".git");
+ };
+ -- on_new_config = function(new_config) end;
+ -- on_attach = function(client, bufnr) end;
+ docs = {
+ description = [[
+https://github.com/golang/tools/tree/master/gopls
+
+Google's lsp server for golang.
+]];
+ default_config = {
+ root_dir = [[root_pattern("go.mod", ".git")]];
+ };
+ };
+}
+-- vim:et ts=2 sw=2