# emmet-ls

> emmet support by LSP

Latest version **0.4.2** (published 2023-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install emmet-ls
pnpm add emmet-ls
yarn add emmet-ls
bun add emmet-ls
```

Provides the command `emmet-ls`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.2 |
| Published | 2023-04-20 |
| First published | 2020-12-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 5 |
| Unpacked size | 21.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 402 |
| Author | aca |
| Maintainers | acadx0 |

## Links

- npm: https://www.npmjs.com/package/emmet-ls
- Repository: https://github.com/aca/emmet-ls
- Homepage: https://github.com/aca/emmet-ls#readme
- Issues: https://github.com/aca/emmet-ls/issues
- npm.io page: https://npm.io/package/emmet-ls

## Dependencies (5)

- [emmet](https://npm.io/package/emmet.md) ^2.3.6
- [typescript](https://npm.io/package/typescript.md) ^4.8.4
- [@types/node](https://npm.io/package/@types/node.md) ^17.0.45
- [vscode-languageserver](https://npm.io/package/vscode-languageserver.md) ^7.0.0
- [vscode-languageserver-textdocument](https://npm.io/package/vscode-languageserver-textdocument.md) ^1.0.7

## Recent versions

- 0.4.2 (latest) — 2023-04-20
- 0.4.1 — 2023-04-19
- 0.3.1 — 2022-10-16
- 0.3.0 — 2022-05-15
- 0.2.2 — 2022-02-12
- 0.2.0 — 2021-11-29
- 0.1.4 — 2021-11-29
- 0.1.3 — 2021-10-24
- 0.1.2 — 2021-10-15
- 0.1.1 — 2021-05-19
- 0.1.0 — 2020-12-26

## README

# emmet-ls

Emmet support based on LSP.  
Started as [coc-emmet](https://github.com/neoclide/coc-emmet) replacement for [completion-nvim](https://github.com/nvim-lua/completion-nvim). Should work with any lsp client but not tested.

![alt](./.image/capture.gif)


#### Install
```
npm install -g emmet-ls
```

#### Configuration 

##### Example Configuration

With [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig):

```lua
local lspconfig = require('lspconfig')
local configs = require('lspconfig/configs')
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true

lspconfig.emmet_ls.setup({
    -- on_attach = on_attach,
    capabilities = capabilities,
    filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "svelte", "pug", "typescriptreact", "vue" },
    init_options = {
      html = {
        options = {
          -- For possible options, see: https://github.com/emmetio/emmet/blob/master/src/config.ts#L79-L267
          ["bem.enabled"] = true,
        },
      },
    }
})
```

##### Supported Filetypes

- `html`, `pug`, `typescriptreact`, `javascript`, `javascriptreact`, `svelte`, `vue`, `css`, `sass`, `scss` and `less` filetypes are fully supported.
- Any other filetype is treated as `html`.

---
_Source: https://npm.io/package/emmet-ls · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
