Skip to content

Commit

Permalink
fix: silence treesitter errors of invalid langs. Covered by checkhealth
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 25, 2022
1 parent 0b0e8cf commit db1628f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/noice/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function View:render(buf, opts)
end

if self._opts.lang and not vim.b[buf].ts_highlight then
vim.treesitter.start(buf, self._opts.lang)
pcall(vim.treesitter.start, buf, self._opts.lang)
end

vim.api.nvim_buf_clear_namespace(buf, Config.ns, linenr - 1, -1)
Expand Down

0 comments on commit db1628f

Please sign in to comment.