Closed balazs4 closed 1 month ago
This was just changed in #1464 by @RayGuo-ergou.
I just tried reproducing this on NVIM v0.11.0-dev-881+g865ba42e0
without treesitter enabled with no success.
Is it possible NVIM v0.11.0-dev-836+g64847fbdc
doesn’t contain the aforementioned upstream treesitter changes? Can you try with the latest nightly?
Hi @balazs4 try to upgrade your neovim to recent nightly. Should fix your issue.
The reason for my PR was to adopt new breaking change in neovim and yes it will break for some nightly users but I think the point of "nightly" is to expect breaking changes with most advanced features. So I feel this should not be reverted.
Had a second look into upstream change, it seems the 'add' function was only return void(nil in lua?) before the breaking change. Which means loaded is always falsely.
https://github.com/ibhagwan/fzf-lua/commit/ebb89e4e4065e31b029eee8f618e1ca660f41f35
Looking at the error it seems that lang
is returned nil and then the call to vim.treesitter.start
will fail, I simplified the PR by validating lang
before calling utils.has_ts_parser
, merged manually
Ah that's right sorry did not pay much attention to the error message.
@ibhagwan @RayGuo-ergou thanks for quick response here! 🙏
i've just updated both nvim-nightly and fzf-lua (with the merged commit); it works ✅
ps: Thanks for this extension, btw. 💯
Ty @balazs4 for confirming the fix, the PR and your kind words 🥳
I've experienced that recent changes causes the following error if TreeSitter is not activated.
I get this error even on
require('fzf-lua').files
call:This PR turns the related call (following stacking trace) into protected call.
I've tested it with my own config .config/nvim/init.lua on macOS.