Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
fix(langs,typescript): Missing lsp_config in typescript module
Browse files Browse the repository at this point in the history
  • Loading branch information
connorgmeean committed Oct 12, 2022
1 parent 0e966de commit fa0c821
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions lua/doom/modules/langs/typescript/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions lua/doom/modules/langs/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa0c821

Please sign in to comment.