diff options
author | Chase Colman <[email protected]> | 2021-10-28 21:15:49 +0800 |
---|---|---|
committer | Chase Colman <[email protected]> | 2021-10-28 21:15:49 +0800 |
commit | 6b8ef55e3de47224cd40de1d67831901484d3d5a (patch) | |
tree | bfe8f527a67e844d1e910ba13a6a969848b1b34f /lua/lvim/lsp/templates.lua | |
parent | 177916d63d7e1c748c48436ef93b30f0019eacac (diff) |
fix(lsp): install templates and configure overrides for custom providers
Diffstat (limited to 'lua/lvim/lsp/templates.lua')
-rw-r--r-- | lua/lvim/lsp/templates.lua | 3 |
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 |