npm package: @hamadah2o2/coc-html-css-support
Description: HTML id and class attribute completion for coc.nvim, with workspace css finding
Author: Hamadah2O2
Latest version: 0.5.6

# coc-html-css-support

> fork from a [ecmel/vscode-html-css](https://github.com/ecmel/vscode-html-css) | [HTML CSS Support](https://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css) | and the origin [yaegassy/coc-html-css-support](https://github.com/yaegassy/coc-html-css-support) 

HTML id and class attribute "completion" for [coc.nvim](https://github.com/neoclide/coc.nvim). With on workspace css finding 

<img width="780" alt="coc-html-css-support-demo" src="https://user-images.githubusercontent.com/188642/116341049-2b5c8880-a81b-11eb-959e-2d03edda61fd.gif">

## Install

### Using Lazy
```lua
{
  "Hamadah2O2/coc-html-css-support",
  build = "yarn install --frozen-lockfile",
  config = function()
    vim.cmd([[autocmd BufWritePost *.css CocCommand html-css-support.dispose]]) -- Automate dispose html-css-support on css BufWritePost
  end
}
```

### Using CocInstall command
`:CocInstall @hamadah2o2/coc-html-css-support`

## Features

- HTML id and class attribute completion.
- Supports linked and embedded style sheets.
- Supports template inheritance.
- Supports additional style sheets.
- Supports other HTML like languages.
- Supports style sheets finding on current working directory.
- Command to make `html.customData` built-in in `coc-html-css-support` available at the workspace level.
  - Require [coc-html](https://github.com/neoclide/coc-html)

## Configuration options

- `html-css-support.enable`: Enable coc-html-css-support extension, default: `true`
- `html-css-support.enabledLanguages`: List of languages which suggestions are desired, default: `["html"]`
- `html-css-support.styleSheets`: List of local or remote style sheets for suggestions, default: `[]`

## Commands

- `html-css-support.dispose`: Clear cache and reload the stylesheet
- `html-css-support.customDataSetup`: Setup `html.customData` in workspace config. Supported customData are as follows
  - `Alpine.js`
  - `petite-vue`

## Example settings

### Additional Style Sheets (Example)

**coc-settings.json:**

```json
{
    "html-css-support.styleSheets": [
        "https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css",
        "/style.css",
        "style.css"
    ]
}
```

### Add other HTML like languages (Example)

**coc-settings.json:**

```json
{
    "html-css-support.enabledLanguages": [
        "html",
        "vue",
        "blade",
        "htmldjango",
        "typescriptreact",
        "javascriptreact"
    ]
}
```

## What is customData?

You can read more about customData in the following repositories.

- <https://github.com/microsoft/vscode-custom-data>
- <https://github.com/Microsoft/vscode-html-languageservice/blob/main/docs/customData.md>

## Thanks

- [yaegassy/coc-html-css-support](https://github.com/yaegassy/coc-html-css-support)
- [ecmel/vscode-html-css](https://github.com/ecmel/vscode-html-css) : The origin of yaegassy/coc-html-css-support repository.

## License

MIT

---

> This extension is built with [create-coc-extension](https://github.com/fannheyward/create-coc-extension)