mattn / emmet-vim

emmet for vim: http://emmet.io/

Home Page:http://mattn.github.io/emmet-vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emmet not expanding correctly when there is a colon on syntax

efierros opened this issue · comments

When I do:
.x:scol-12

The expect behavior and the result in SublimeText and VS Code is
<div class="x:scol-12"></div>

But in emmet-vim the result is:
<div class="x"></div>

Is there a config fix for this?

working fine after I installed coc-emmet, maybe it can help your problem

https://github.com/neoclide/coc-emmet/blob/master/Readme.md

Peek 2021-10-01 20-11

Sorry but even with coc-emmet is not working, I don't know if I need some extra configuration but as I use nvim-lsp and treesitter, there might be some incompatibility issues.

Thanks anyways.

I am having the same issue as well. I haven't tried installing coc-emmet yet but I would expect the base emmet to support this in vim.

@aldimhr I attempted using coc-emmet too and this didn't seem to work for me either I end up getting just <div class="md"></div> when I input div.md:hidden as an example.

I tried this on a nvim fresh install and it's the same. Tried with vim plug and Packer.

@efierros @SpazJibo
Hi, I just tried to uninstall coc-emmet, same result as you guys. In my case, coc-emmet was the solution.

Here is my vimrc https://gist.github.com/aldimhr/30a070570889a8215589fadee29baa1b

Appreciate, if there is any other information so that I can help with this issues

@aldimhr HI, thanks for your help, but even with your configuration I can't make emmet work properly.

I don't know if it might be the version, I'm using nvim v0.6.1

I'm having the same issue, vim 9.0.1050. Entering .p-12.md:p-16 with coc-emmet installed produces the correct expansion preview:
Screen Shot 2023-01-05 at 6 28 47 AM

But expanding it produces this:

Screen Shot 2023-01-05 at 6 29 04 AM

The expected expansion should be <div class="p-12 md:p-16"></div>. Any advice @mattn? Thanks!

It looks like this issue was fixed in PR #474 by @petter in 2020, but @mattn hasn't merged it. I just changed my .vimrc to point to @petter's branch instead:

" Emmet
" Plug 'https://github.com/mattn/emmet-vim.git'
" Emmet with : expansion fix
Plug 'https://github.com/petter/emmet-vim.git'

emmet-vim mov

Thanks @petter, and thanks to @mattn for making emmet-vim OSS!