summaryrefslogtreecommitdiff
path: root/lua/lvim/lsp/templates.lua
diff options
context:
space:
mode:
authorLostNeophyte <[email protected]>2023-02-11 18:01:22 +0100
committerGitHub <[email protected]>2023-02-11 18:01:22 +0100
commitbaf71343f024ce867292c1c9dc3674ca0a100774 (patch)
treef5ba471604c666ac437c90d442adca7013a224ba /lua/lvim/lsp/templates.lua
parentc27d6a6c3e3aafc66e32cb3640876197ffab4da5 (diff)
fix(lsp): template generation for filetypes with dots (#3833)
Diffstat (limited to 'lua/lvim/lsp/templates.lua')
-rw-r--r--lua/lvim/lsp/templates.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/lua/lvim/lsp/templates.lua b/lua/lvim/lsp/templates.lua
index dc2e5b11..7df19a71 100644
--- a/lua/lvim/lsp/templates.lua
+++ b/lua/lvim/lsp/templates.lua
@@ -44,6 +44,7 @@ function M.generate_ftplugin(server_name, dir)
end
for _, filetype in ipairs(filetypes) do
+ filetype = filetype:match "%.([^.]*)$" or filetype
local filename = join_paths(dir, filetype .. ".lua")
local setup_cmd = string.format([[require("lvim.lsp.manager").setup(%q)]], server_name)
-- print("using setup_cmd: " .. setup_cmd)