Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roobert/tailwindcss-colorizer-cmp.nvim
:rainbow: A Neovim plugin to add vscode-style TailwindCSS completion to nvim-cmp
https://github.com/roobert/tailwindcss-colorizer-cmp.nvim
Last synced: 14 days ago
JSON representation
:rainbow: A Neovim plugin to add vscode-style TailwindCSS completion to nvim-cmp
- Host: GitHub
- URL: https://github.com/roobert/tailwindcss-colorizer-cmp.nvim
- Owner: roobert
- Created: 2023-01-13T18:45:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-23T11:49:43.000Z (8 months ago)
- Last Synced: 2024-07-31T20:42:42.000Z (3 months ago)
- Language: Lua
- Homepage:
- Size: 22.5 KB
- Stars: 317
- Watchers: 5
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-neovim - roobert/tailwindcss-colorizer-cmp.nvim - Add vscode-style TailwindCSS completion to nvim-cmp. (Programming Languages Support / Web Development)
README
# :rainbow: TailwindCSS Colorizer CMP
![tailwindcss-colorizer-cmp Screenshot](https://user-images.githubusercontent.com/226654/222544107-6c0164ad-63b5-429c-94cd-2800cb44dff2.gif)
A Neovim plugin to add [vs-code-style TailwindCSS color hints](https://tailwindcss.com/docs/editor-setup#intelli-sense-for-vs-code) to the `nvim-cmp` completion menu.
## :rocket: Installation
### Packer.nvim
``` lua
use({
"roobert/tailwindcss-colorizer-cmp.nvim",
-- optionally, override the default options:
config = function()
require("tailwindcss-colorizer-cmp").setup({
color_square_width = 2,
})
end
})
```### Lazy.nvim
``` lua
{
"roobert/tailwindcss-colorizer-cmp.nvim",
-- optionally, override the default options:
config = function()
require("tailwindcss-colorizer-cmp").setup({
color_square_width = 2,
})
end
}
```## :hammer_and_wrench: Usage
After installing the plugin, please ensure it's initialised with one of the following:
### Standard Neovim
``` lua
require("cmp").config.formatting = {
format = require("tailwindcss-colorizer-cmp").formatter
}
```### LunarVim
``` lua
lvim.builtin.cmp.formatting = {
format = require("tailwindcss-colorizer-cmp").formatter
}
```## :heart: Related
If you'd also like color highlighting in the buffer, please see: [NvChad/nvim-colorizer.lua](https://github.com/NvChad/nvim-colorizer.lua)
A nice video on adding various tailwind support to Neovim can be found [here](https://www.youtube.com/watch?v=_NiWhZeR-MY&t=43s).