Skip to content

Commit cb9397c

Browse files
committed
fix: skip treesitter hl on nil lang
1 parent 67fa41f commit cb9397c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/blink/cmp/utils.lua

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ function utils.highlight_with_treesitter(bufnr, filetype, start_line, end_line)
8383
local Range = require('vim.treesitter._range')
8484

8585
local root_lang = vim.treesitter.language.get_lang(filetype)
86+
if root_lang == nil then return end
87+
8688
local trees = vim.treesitter.get_parser(bufnr, root_lang)
8789
trees:parse({ start_line, end_line })
8890
if not trees then return end

0 commit comments

Comments
 (0)