8000 GitHub - casio/emmet-ls: Emmet support based on LSP.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

casio/emmet-ls

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • nvim-lspconfig

    local nvim_lsp = require'lspconfig'
    local configs = require'lspconfig/configs'
    local capabilities = vim.lsp.protocol.make_client_capabilities()
    capabilities.textDocument.completion.completionItem.snippetSupport = true
    
    configs.emmet_ls = {
      default_config = {
        cmd = {'emmet-ls', '--stdio'};
        filetypes = {'html', 'css'};
        root_dir = function()
          return vim.loop.cwd()
        end;
        settings = {};
      };
    }
    
    nvim_lsp.emmet_ls.setup{
      on_attach = on_attach;
    }
  • completion-nvim

    Completion is triggered if completion_trigger_character is entered. It's limitation of completion-nvim.

    let g:completion_trigger_character = ['.']

    If you have set it like this, You will have to add trailing '.' after emmet abbreviation.

    div>h.
    

    And it will be expanded to

    <div>
      <h class=""></h>
    </div>
    

About

Emmet support based on LSP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%
0