emmet-ls.lua 565 B

1234567891011121314151617181920212223
  1. -- if not package.loaded['lspconfig'] then
  2. -- return
  3. -- end
  4. local nvim_lsp = require'lspconfig'
  5. local configs = require'lspconfig/configs'
  6. local capabilities = vim.lsp.protocol.make_client_capabilities()
  7. capabilities.textDocument.completion.completionItem.snippetSupport = true
  8. configs.emmet_ls = {
  9. default_config = {
  10. cmd = {'emmet-ls', '--stdio'};
  11. filetypes = {'html', 'css', 'javascript', 'typescript'};
  12. root_dir = function()
  13. return vim.loop.cwd()
  14. end;
  15. settings = {};
  16. };
  17. }
  18. nvim_lsp.emmet_ls.setup{
  19. -- on_attach = on_attach;
  20. }