refactor(treesitter)!: get_parser return nil on error #37276

This commit is contained in:
nikolightsaber
2026-03-13 20:57:36 +01:00
committed by GitHub
parent 8499af1119
commit fd1e019e90
13 changed files with 35 additions and 49 deletions

View File

@@ -8,7 +8,7 @@
local function get_commentstring(ref_position)
local buf_cs = vim.bo.commentstring
local ts_parser = vim.treesitter.get_parser(0, '', { error = false })
local ts_parser = vim.treesitter.get_parser(0, '')
if not ts_parser then
return buf_cs
end