From fa0c8216cb26d6fba573903eaf08cd1a36ac39e6 Mon Sep 17 00:00:00 2001 From: connorgmeean Date: Thu, 13 Oct 2022 00:22:37 +1100 Subject: [PATCH] fix(langs,typescript): Missing lsp_config in typescript module --- lua/doom/modules/langs/typescript/init.lua | 3 +++ lua/doom/modules/langs/utils.lua | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lua/doom/modules/langs/typescript/init.lua b/lua/doom/modules/langs/typescript/init.lua index 707fa00..591015d 100644 --- a/lua/doom/modules/langs/typescript/init.lua +++ b/lua/doom/modules/langs/typescript/init.lua @@ -14,6 +14,9 @@ typescript.settings = { --- Name of the language server --- @type string lsp_name = "tsserver", + --- Custom config to pass to nvim-lspconfig + --- @type table|nil + lsp_config = nil, --- Disables null-ls formatting sources --- @type boolean diff --git a/lua/doom/modules/langs/utils.lua b/lua/doom/modules/langs/utils.lua index cb87d7e..1969dfb 100644 --- a/lua/doom/modules/langs/utils.lua +++ b/lua/doom/modules/langs/utils.lua @@ -296,10 +296,12 @@ end ---@return function Wrapped setup function module.wrap_language_setup = function(module_name, setup_fn) local setup_language = function() - local ok, error = xpcall(setup_fn, debug.traceback) - if not ok then - log.error(("Error setting up language `%s`. \n%s"):format(module_name, error)) - end + vim.defer_fn(function() + local ok, error = xpcall(setup_fn, debug.traceback) + if not ok then + log.error(("Error setting up language `%s`. \n%s"):format(module_name, error)) + end + end, 1) end return setup_language end