diff options
| author | Reto <reto@labrat.space> | 2021-12-26 22:18:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-26 16:18:20 -0500 |
| commit | caee8c5d15819a4c2e27314e4a3a894c1a3b118f (patch) | |
| tree | 957bddac8c952a6e89a79d9f4c7a1d64f3794b16 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-caee8c5d15819a4c2e27314e4a3a894c1a3b118f.tar nvim-lspconfig-caee8c5d15819a4c2e27314e4a3a894c1a3b118f.tar.gz nvim-lspconfig-caee8c5d15819a4c2e27314e4a3a894c1a3b118f.tar.bz2 nvim-lspconfig-caee8c5d15819a4c2e27314e4a3a894c1a3b118f.tar.lz nvim-lspconfig-caee8c5d15819a4c2e27314e4a3a894c1a3b118f.tar.xz nvim-lspconfig-caee8c5d15819a4c2e27314e4a3a894c1a3b118f.tar.zst nvim-lspconfig-caee8c5d15819a4c2e27314e4a3a894c1a3b118f.zip | |
feat: add gotmpl to gopls filetypes (#1619)
gopls introduced support for template files, see: https://github.com/golang/tools/blob/master/gopls/doc/features.md#template-files
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/gopls.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lspconfig/server_configurations/gopls.lua b/lua/lspconfig/server_configurations/gopls.lua index 2cb82b4d..e8455c8e 100644 --- a/lua/lspconfig/server_configurations/gopls.lua +++ b/lua/lspconfig/server_configurations/gopls.lua @@ -3,7 +3,7 @@ local util = require 'lspconfig.util' return { default_config = { cmd = { 'gopls' }, - filetypes = { 'go', 'gomod' }, + filetypes = { 'go', 'gomod', 'gotmpl' }, root_dir = function(fname) return util.root_pattern 'go.work'(fname) or util.root_pattern('go.mod', '.git')(fname) end, |
