@mskelton/emmet-ls

0.3.1 • Public • Published

emmet-ls

Emmet support based on LSP.
Started as coc-emmet replacement for completion-nvim. Should work with any lsp client but not tested.

alt

Install

npm install -g emmet-ls

Configuration

Example Configuration

With nvim-lspconfig:

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 = { 'html', 'typescriptreact', 'javascriptreact', 'css', 'sass', 'scss', 'less' },
    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, typescriptreact, javascriptreact, css, sass, scss and less filetypes are fully supported.
  • Any other filetype is treated as html.

Readme

Keywords

none

Package Sidebar

Install

npm i @mskelton/emmet-ls

Weekly Downloads

0

Version

0.3.1

License

MIT

Unpacked Size

17.5 kB

Total Files

8

Last publish

Collaborators

  • mskelton