mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 19:50:38 +00:00
feat(tailwind-sorter.lua): add tailwind-sorter plugin and configuration
The tailwind-sorter.lua file was added to the absolute/after directory. This file sets up the tailwind-sorter plugin with the following configuration: - on_save_enabled is set to true, enabling the plugin to run on file save. - on_save_pattern is set to a list of file patterns for which the plugin should run on save. The patterns include "*.html", "*.js", "*.jsx", "*.tsx", "*.twig", "*.hbs", "*.php", "*.heex", "*.astro", and "*.vue". Additionally, the tailwind-sorter.lua file was added to the absolute/plugins directory. This file returns a table with the following properties: - The first element is the plugin name "laytan/tailwind-sorter.nvim". - The dependencies property specifies the required plugins "nvim-treesitter/nvim-treesitter" and "nvim-lua/plenary.nvim". - The build property specifies the build command to be executed in the "formatter" directory. This command installs the necessary npm packages and builds the plugin. - The config property is a function that requires the "absolute.after.tailwind-sorter" module, which contains the plugin configuration. These changes were made to add the tailwind-sorter plugin to the project and configure it for use.
This commit is contained in:
6
lua/absolute/after/tailwind-sorter.lua
Normal file
6
lua/absolute/after/tailwind-sorter.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
local tws = require("tailwind-sorter")
|
||||
|
||||
tws.setup({
|
||||
on_save_enabled = true,
|
||||
on_save_pattern = { "*.html", "*.js", "*.jsx", "*.tsx", "*.twig", "*.hbs", "*.php", "*.heex", "*.astro", "*.vue" }, -- T
|
||||
})
|
||||
8
lua/absolute/plugins/tailwind-sorter.lua
Normal file
8
lua/absolute/plugins/tailwind-sorter.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"laytan/tailwind-sorter.nvim",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-lua/plenary.nvim" },
|
||||
build = "cd formatter && npm i && npm run build",
|
||||
config = function()
|
||||
require("absolute.after.tailwind-sorter")
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user