aca / emmet-ls

Emmet support based on LSP.
MIT License
334 stars 31 forks source link

Support for jsx #10

Closed Delhi-Babu closed 2 years ago

Delhi-Babu commented 3 years ago

thx for the lsp, works great. Is there any support for jsx or future plans. here is my config for reference

local capabilities = vim.lsp.protocol.make_client_capabilities()

capabilities.textDocument.completion.completionItem.snippetSupport = true

require "lspconfig/configs".emmet_ls = {
  default_config = {
    cmd = {"emmet-ls", "--stdio"},
    filetypes = {"html", "css", "javascript", "javascriptreact", "javascript.jsx"},
    root_dir = require "lspconfig".util.root_pattern(".git", vim.fn.getcwd())
  }
}

require "lspconfig".emmet_ls.setup {
  on_attach = require "nvim-lsp".common_on_attach
}
prncss-xyz commented 3 years ago

and tsx :-)

kozer commented 2 years ago

I have created a new package based on this repo named emmet-language-server which fix jsx issue. It also includes the changes of the pr that is opened in the current repo (fix snippet expanding). Till this repo gets life again you can install it with npm i -g @kozer/emmet-language-server Check the repo here

martinsione commented 2 years ago

Is there any plans on adding support to jsx and tsx files? Because this is the plugin installed by nvim-lsp-installer and in my case is more convenient to use but if there is no plans on extending support I might consider moving to the above mention fork.

ShiChenCong commented 2 years ago

https://github.com/pedro757/emmet found the repo,base on lsp,support jsx

Ali-Aref commented 2 years ago

Will you support jsx/tsx or not? kindly give us a feedback as martinsione mentioned this is the default nvim-lsp-install and we would prefer this if it supports else just let us know.

aca commented 2 years ago

Sorry for late response. Updated.

aca commented 2 years ago

lspconfig should also be updated. Will check it later. You have to customize lspconfig for now.

local lspconfig = require("lspconfig")
lspconfig.emmet_ls.setup({
    -- capabilities = capabilities,
    -- on_attach = on_attach,
    filetypes = { "html", "css", "typescriptreact", "javascriptreact" },
})
santiago-webdev commented 2 years ago

Do we have to configure anything else for jsx and tsx files to use className instead of class?