summaryrefslogtreecommitdiff
path: root/lua/lvim/lsp/templates.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lvim/lsp/templates.lua')
-rw-r--r--lua/lvim/lsp/templates.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/lvim/lsp/templates.lua b/lua/lvim/lsp/templates.lua
index 3478f4fb..33c75a6e 100644
--- a/lua/lvim/lsp/templates.lua
+++ b/lua/lvim/lsp/templates.lua
@@ -19,7 +19,8 @@ end
---@param server_name string name of a valid language server, e.g. pyright, gopls, tsserver, etc.
---@param dir string the full path to the desired directory
function M.generate_ftplugin(server_name, dir)
- if vim.tbl_contains(lvim.lsp.override, server_name) then
+ local has_custom_provider, _ = pcall(require, "lvim/lsp/providers/" .. server_name)
+ if vim.tbl_contains(lvim.lsp.override, server_name) and not has_custom_provider then
return
end