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