Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softmotions/coc-class-css
Vim/Neovim CoC CSS class completion plugin
https://github.com/softmotions/coc-class-css
autocompletion coc coc-extension coc-plugin css html neovim nvim scss svelte tailwindcss vim vue
Last synced: 6 days ago
JSON representation
Vim/Neovim CoC CSS class completion plugin
- Host: GitHub
- URL: https://github.com/softmotions/coc-class-css
- Owner: Softmotions
- Created: 2022-12-18T13:10:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-04T17:51:35.000Z (almost 2 years ago)
- Last Synced: 2024-11-02T22:03:28.257Z (6 days ago)
- Topics: autocompletion, coc, coc-extension, coc-plugin, css, html, neovim, nvim, scss, svelte, tailwindcss, vim, vue
- Language: TypeScript
- Homepage:
- Size: 322 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vim/Neovim CoC CSS class selectors completion plugin
`coc-class-css` [CoC](https://github.com/neoclide/coc.nvim) is an autocompletion plugin of CSS/PostCSS/SCSS
classes in HTML like markup.![screenshot](./images/screen1.png)
All you need is to configure root css files to start from.
## Requirements
* CoC vim plugin `v0.0.80+`
* [Watchman](https://facebook.github.io/watchman/) installed in order to update completion index when files changed.## Installation
```
:CocInstall coc-class-css
```## Configuration
### Recommended way
Place a `.coc-class-css.json` file alongside of your `package.json` like this:
```json
{
"cssRoots": ["./src/index.css"],
"classAttributes": ["class"]
}
```Where `cocRoots` specifies css files to process. Local `@import` directives are supported as well.
### CoC configuration options.
* `coc-class-css.languages` List of file types for which this plugin will be activated.
Default: `["html", "svelte", "vue"]`
* `coc-class-css.cssRoots` Initial set of css files.
* `coc-class-css.classAttributes` List of `class` like HTML attributes to trigger autocompletion. Default: `["class"]`
Note: `tailwindCSS.classAttributes` is also taken into account.## Tips
For correct autocompletion for keywords with dashes it also recommended to setup `b:coc_additional_keywords`
```vimscript
autocmd FileType * let b:coc_additional_keywords = ["-"]
```