Easily sort Tailwind classes in Neovim.
Overview
The Tailwind Sorter for Neovim is an innovative tool designed to streamline your Tailwind CSS class management. Much like prettier-plugin-tailwindcss, it ensures that your classes are sorted efficiently while integrating seamlessly with Treesitter for language support. This makes it not only functional for a variety of programming languages but also easy to extend to new file types.
With its user-friendly commands and customizable configurations, Tailwind Sorter significantly enhances the coding experience by efficiently organizing your Tailwind classes without the need for heavier tools like Prettier. It’s a perfect solution for developers looking to maintain clean and organized code effortlessly.
Features
- Broad Language Support: Works with multiple file types, including JSX, TSX, HTML, Handlebars, Elixir/HEEX, Astro, Haskell, and any language that incorporates these languages.
- Lightweight Solution: Avoids the need to implement Prettier solely for Tailwind CSS class sorting, making it more efficient.
- Speedy Sorting: Tailwind sorting is quicker than using Prettier, making it ideal for developers who focus specifically on Tailwind.
- Customizable Commands: Features easy-to-use commands like
TailwindSort for sorting classes in the current buffer and TailwindSortOnSaveToggle for automatic sorting on save. - Extensible: Simple to extend for additional languages or use-cases, encouraging developers to contribute new features and adapt it according to their needs.
- NodeJS Requirement: Compatible with NodeJS versions 16, 18, and 20, ensuring a modern environment for running the plugin.
- Configuration Flexibility: Offers a default configuration that can be tailored to individual project requirements for an optimized experience.
- Treesitter Integration: Leverages Treesitter for accurate class identification, significantly enhancing its sorting capabilities across languages.