Skip to content

Commit

Permalink
fix: properly log TS error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Mar 24, 2024
1 parent 59b6d61 commit 73db6b5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lua/neorg/modules/core/integrations/treesitter/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -787,18 +787,17 @@ module.on_event = function(event)
module.public.goto_previous_query_match(module.private.link_query)
end
elseif event.split_type[2] == "sync-parsers" then
local ok = pcall(install_norg_ts)
local ok, err = pcall(install_norg_ts)

if not ok then
utils.notify(
[[Unable to install norg parser.
]],
string.format([[Unable to auto-install Norg parser: %s]], err),
vim.log.levels.WARN
)
end


pcall(vim.cmd.TSInstallSync, { args = "norg", bang = true })
pcall(vim.cmd.TSInstallSync, { args = "norg_meta", bang = true })
end
end

Expand Down

0 comments on commit 73db6b5

Please sign in to comment.