Browse Source

fix(langs,typescript): Missing lsp_config in typescript module

my-config
connorgmeean 2 years ago
parent
commit
fa0c8216cb
  1. 3
      lua/doom/modules/langs/typescript/init.lua
  2. 10
      lua/doom/modules/langs/utils.lua

3
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

10
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

Loading…
Cancel
Save