mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
perf(win): don't try highlighting snacks internal filetypes
This commit is contained in:
parent
166aed6c5d
commit
eb8ab37f6a
1 changed files with 1 additions and 1 deletions
|
|
@ -369,7 +369,7 @@ function M:show()
|
|||
|
||||
-- syntax highlighting
|
||||
local ft = self.opts.ft or vim.bo[self.buf].filetype
|
||||
if ft and not vim.b[self.buf].ts_highlight and vim.bo[self.buf].syntax == "" then
|
||||
if ft and not ft:find("^snacks_") and not vim.b[self.buf].ts_highlight and vim.bo[self.buf].syntax == "" then
|
||||
local lang = vim.treesitter.language.get_lang(ft)
|
||||
if not (lang and pcall(vim.treesitter.start, self.buf, lang)) then
|
||||
vim.bo[self.buf].syntax = ft
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue