Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pedro757/emmet
Emmet language server for autocompletion in LSP compatible editors
https://github.com/pedro757/emmet
Last synced: 3 months ago
JSON representation
Emmet language server for autocompletion in LSP compatible editors
- Host: GitHub
- URL: https://github.com/pedro757/emmet
- Owner: pedro757
- Created: 2021-09-01T03:15:38.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-09T01:40:16.000Z (over 2 years ago)
- Last Synced: 2024-08-04T15:04:07.006Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 29.3 KB
- Stars: 91
- Watchers: 5
- Forks: 4
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Emmets
Emmet server for neovim completion based on LSP and official emmet library.
See emmet documentation [here](https://docs.emmet.io/)
![emmet-gif](https://i.ibb.co/TgHGmsb/emmet.gif)
## Requirements
1. [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) Installed
2. A completion plugin that supports LSP, like:
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
- [nvim-completion](https://github.com/nvim-lua/completion-nvim)
3. A Snippet plugin that supports LSP, like:
- [luasnip](https://github.com/L3MON4D3/LuaSnip)
- [vim-vsnip](https://github.com/hrsh7th/vim-vsnip)## Install
```
npm install -g ls_emmet
```## Configuration
In your neovim config:
```lua
local lspconfig = require'lspconfig'
local configs = require'lspconfig.configs'local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = trueif not configs.ls_emmet then
configs.ls_emmet = {
default_config = {
cmd = { 'ls_emmet', '--stdio' };
filetypes = {
'html',
'css',
'scss',
'javascriptreact',
'typescriptreact',
'haml',
'xml',
'xsl',
'pug',
'slim',
'sass',
'stylus',
'less',
'sss',
'hbs',
'handlebars',
};
root_dir = function(fname)
return vim.loop.cwd()
end;
settings = {};
};
}
endlspconfig.ls_emmet.setup { capabilities = capabilities }
```
Just type:
```
table>tr*3>td*2
```And it will be expanded to:
```html
|
```
## Contribuiting
Bug reports, feature suggestions and especially code contributions are welcome. You open a GitHub issue or pull
request. Please read [this document](CONTRIBUTING.md) before opening an issue.## Supported Languages
| Markup | StyleSheets |
|--------- | -------------- |
| HTML | CSS |
| TSX | SCSS |
| JSX | SASS |
| JS | STYLUS |
| XML | SSS |
| XSL | LESS |
| HAML | |
| PUG | |
| SLIM | |
| HBS | |