Closed mmirus closed 1 year ago
Hey, thanks for bringing this up!
I will go over the plugin tomorrow and make sure everything works on the stable neovim branch as well.
Will also add testing on the stable version to the ci so this doesn't happen again!
Yeah, ran into this here as well. Changing tailwind-sorter.nvim/lua/tailwind-sorter/tsutil.lua#74
to:
local query = vim.treesitter.query.get_query(lang, 'tailwind')
... fixes it.
Output from :lua print(vim.inspect(require'vim.treesitter.query'))
:
{
add_directive = <function 1>,
add_predicate = <function 2>,
get_node_text = <function 3>,
get_query = <function 4>,
get_query_files = <function 5>,
list_directives = <function 6>,
list_predicates = <function 7>,
parse_query = <function 8>,
set_query = <function 9>
}
neovim info:
❯ nvim --version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Thanks both! @laytan LMK if there's anything I can do to help test.
@jayroh Thanks! Yes it would fix it on stable, on nightly I think that function is deprecated in favor of the one I used here. I will have to add a check to choose between the 2.
@mmirus @jayroh This is now fixed on the main branch and the v2.2.1 release.
Thank you for the quick fix, @laytan! :partying_face:
Yessss! Thanks so much!
Hey there! Thanks for the plugin!
After updating to the most recent commit, when I run
TailwindSort
, I receive:I'm guessing that this commit breaks compatibility with neovim 0.8.
Reverting to https://github.com/laytan/tailwind-sorter.nvim/commit/7a32f59c0cc8a73022be2c93fcbac1de825abfb9 fixes the error.
If that's correct, would it be possible to maintain compatibility in some form with the current stable neovim release? I (and likely many other) don't like to run nightly.
Worst case, I can pin to the last good commit.