https://github.com/aca/emmet-ls
Emmet support based on LSP.
https://github.com/aca/emmet-ls
Last synced: 5 months ago
JSON representation
Emmet support based on LSP.
- Host: GitHub
- URL: https://github.com/aca/emmet-ls
- Owner: aca
- License: mit
- Created: 2020-12-22T14:13:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-08T04:15:33.000Z (almost 2 years ago)
- Last Synced: 2025-09-24T07:52:21.804Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 317 KB
- Stars: 397
- Watchers: 5
- Forks: 31
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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.

#### 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`.