Skip to content

Commit d1739cb

Browse files
committed
feat(util): use treesitter to highlight notify messages when available
1 parent e183601 commit d1739cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/lazy/core/util.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ function M.notify(msg, level)
210210
vim.wo[win].concealcursor = ""
211211
vim.wo[win].spell = false
212212
local buf = vim.api.nvim_win_get_buf(win)
213-
vim.bo[buf].filetype = "markdown"
213+
if not pcall(vim.treesitter.start, buf, "markdown") then
214+
vim.bo[buf].filetype = "markdown"
215+
end
214216
end,
215217
title = "lazy.nvim",
216218
})

0 commit comments

Comments
 (0)