Skip to content

Commit

Permalink
feat(util): use treesitter to highlight notify messages when available
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 27, 2022
1 parent e183601 commit d1739cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/lazy/core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ function M.notify(msg, level)
vim.wo[win].concealcursor = ""
vim.wo[win].spell = false
local buf = vim.api.nvim_win_get_buf(win)
vim.bo[buf].filetype = "markdown"
if not pcall(vim.treesitter.start, buf, "markdown") then
vim.bo[buf].filetype = "markdown"
end
end,
title = "lazy.nvim",
})
Expand Down

0 comments on commit d1739cb

Please sign in to comment.