Closed fdschmidt93 closed 1 month ago
Agree.
But I wonder what happens in starting egrepify without Tree-sitter setup (like nvim --clean
). Does it work good in such case? If no, it is good that README has notice for it.
local function has_ts_parser(lang)
if vim.fn.has "nvim-0.11" == 1 then
return vim.treesitter.language.add(lang)
else
return pcall(vim.treesitter.language.add, lang)
end
end
The above function only returns a parser (i.e., ultimately highlights) if the corresponding language of the file is supported by having a suitable parser in the nvim runtime. In other words, I'm reasonably sure it should be fine.
Thanks for the feedback!
@delphinus thoughts? I think nvim ts performance improved significantly and I don't experience freezes or noticeable slowdowns with this option. And it's too much of a QoL improvement. Agreed?