Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aca/emmet-ls
Emmet support based on LSP.
https://github.com/aca/emmet-ls
Last synced: 3 days 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 (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-19T23:00:00.000Z (over 1 year ago)
- Last Synced: 2024-05-30T03:07:33.922Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 314 KB
- Stars: 329
- Watchers: 6
- Forks: 32
- 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.![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 = truelspconfig.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`.