We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 949b585 commit 7ca9204Copy full SHA for 7ca9204
lua/rest-nvim/ui/result.lua
@@ -23,7 +23,7 @@ local function syntax_highlight(buffer, filetype)
23
-- manually stop any attached tree-sitter parsers (#424, #429)
24
vim.treesitter.stop(buffer)
25
local lang = vim.treesitter.language.get_lang(filetype)
26
- local ok = pcall(vim.treesitter.start, buffer, lang)
+ local ok = lang ~= nil and pcall(vim.treesitter.start, buffer, lang)
27
if not lang or not ok then
28
vim.bo[buffer].syntax = filetype
29
end
0 commit comments