Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Latest Neovim update breaks the sort classes behavior #87

@kayuxx

Description

@kayuxx

Describe the bug
the command should be work when executing the TawilwindSort command, but it appears that it has been broken with the latest neovim update.
The raw error:

Error executing Lua callback: ...im/lazy/tailwind-tools/lua/tailwind-tools/treesitter.lua:23: attempt to index a nil value
stack traceback:
	...im/lazy/tailwind-tools/lua/tailwind-tools/treesitter.lua:23: in function 'get_class_range'
	...im/lazy/tailwind-tools/lua/tailwind-tools/treesitter.lua:68: in function 'fn'
	/usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:650: in function 'for_each_tree'
	...im/lazy/tailwind-tools/lua/tailwind-tools/treesitter.lua:55: in function 'find_class_ranges'
	.../nvim/lazy/tailwind-tools/lua/tailwind-tools/classes.lua:26: in function 'get_ranges'
	...hare/nvim/lazy/tailwind-tools/lua/tailwind-tools/lsp.lua:270: in function <...hare/nvim/lazy/tailwind-tools/lua/tailwind-tools/lsp.lua:268

To Reproduce
Steps to reproduce the behavior:

  1. Open neovim with a html or javascriptreact file type
  2. execute the command "TawilindSort"
  3. See error

Expected behavior
Sort tailwind classes

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS Arch Linux x86_64 with Linux 6.12.9-arch1-1 kernel
  • NVIM v0.11.3
  • Nvim-treesitter commit 42fc28b
  • tailwind-language-server version 0.14.25

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions