diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index c13f4c2..fb25dbf 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -80,6 +80,9 @@ lspconfig.html.setup { } lspconfig.gopls.setup({ + cmd = { "gopls", "-remote=auto" }, + -- attach to new filetypes too. + filetypes = { "go", "gomod", "gowork", "gotmpl", "gohtmltmpl", "gotexttmpl" }, settings = { gopls = { hints = { @@ -91,6 +94,7 @@ lspconfig.gopls.setup({ compositeLiteralTypes = true, functionTypeParameters = true, }, + ["build.templateExtensions"] = { "gohtml", "html", "gotmpl", "tmpl" }, } } })