Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DanielVolchek/tailiscope.nvim
TailwindCSS cheatsheet within Telescope
https://github.com/DanielVolchek/tailiscope.nvim
Last synced: 3 days ago
JSON representation
TailwindCSS cheatsheet within Telescope
- Host: GitHub
- URL: https://github.com/DanielVolchek/tailiscope.nvim
- Owner: DanielVolchek
- License: mit
- Created: 2022-11-17T04:21:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-07T11:55:05.000Z (about 1 year ago)
- Last Synced: 2024-10-30T14:42:07.840Z (15 days ago)
- Language: Lua
- Homepage:
- Size: 231 KB
- Stars: 55
- Watchers: 1
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tailiscope.nvim
Simple Telescope extension that mirrors the [nerdcave cheatsheet](https://nerdcave.com/tailwind-cheat-sheet)
Help maintain development flow within Neovim while using Tailwind CSS
## Demo
### Search through lists and copy what you need:
![](https://github.com/DanielVolchek/tailiscope-media/blob/main/gifs/main.gif)
### Go back between history:
![](https://github.com/DanielVolchek/tailiscope-media/blob/main/gifs/back.gif)
### Open Docs:
![](https://github.com/DanielVolchek/tailiscope-media/blob/main/gifs/docs.gif)
### Search through everything:
![](https://github.com/DanielVolchek/tailiscope-media/blob/main/gifs/all.gif)
## Setup
```lua
-- plugin setup
use("danielvolchek/tailiscope.nvim")
-- anywhere else
require('telescope').load_extension('tailiscope')
```If you have tailwind lsp you can setup on attach
```lua
if client.name == "tailwindcss" then
require('telescope').load_extension('tailiscope')
vim.keymap.set("n", "fw", "Telescope tailiscope")
```## Config
### Default Config
```lua
require('telescope').setup({
extensions = {
tailiscope = {
-- register to copy classes to on selection
register = "a",
-- indicates what picker opens when running Telescope tailiscope
-- can be any file inside of docs dir but most useful opts are
-- all, base, categories, classes
-- These are also accesible by running Telescope tailiscope
default = "base",
-- icon indicates an item which can be opened in tailwind docs
-- can be icon or false
doc_icon = " ",
-- if you would prefer to copy with/without class selector
-- dot is maintained in display to differentiate class from other pickers
no_dot = true,
maps = {
i = {
back = "",
open_doc = "",
},
n = {
back = "b",
open_doc = "od",
},
},
}
}
```### Useful changes
If you would like to set result to default register, set register = '"'
If you would like to open a searchable list of only classes when using :Telescope tailiscope command set default = "classes"
## Future update features
- Maintain search when going back through history
- Support multiselect to copy multiple classes to register
- Even possibly multiselect to open lists of lists together
- Match regex for colors and set highlight if the regex matches
- Get a list of default colors from tailwind docs, also check tailwind config for alternate colors (only matching default color groups)