Skip to content

Commit db1628f

Browse files
committed
fix: silence treesitter errors of invalid langs. Covered by checkhealth
1 parent 0b0e8cf commit db1628f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/noice/view/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ function View:render(buf, opts)
201201
end
202202

203203
if self._opts.lang and not vim.b[buf].ts_highlight then
204-
vim.treesitter.start(buf, self._opts.lang)
204+
pcall(vim.treesitter.start, buf, self._opts.lang)
205205
end
206206

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

0 commit comments

Comments
 (0)