From 8cfe61e4a7ff3d7cea9dd8d8c2ed13564f74b8d7 Mon Sep 17 00:00:00 2001 From: phanium <91544758+phanen@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:51:06 +0800 Subject: [PATCH] fix: get_parser don't throw error in nightly https://github.com/neovim/neovim/pull/37276 --- lua/treesj/format.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/treesj/format.lua b/lua/treesj/format.lua index 3fa9365..dfbe40d 100644 --- a/lua/treesj/format.lua +++ b/lua/treesj/format.lua @@ -50,7 +50,7 @@ function M._format(mode, override) -- and each node will be processed only once (until -- the tree is updated). See issue #118 local ok_ts, parser = pcall(vim.treesitter.get_parser, 0) - if not ok_ts then + if not ok_ts or not parser then notify.error(msg.no_ts_parser) return end