Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emmet not expanding correctly when there is a colon on syntax #521

Open
efierros opened this issue Aug 6, 2021 · 9 comments
Open

Emmet not expanding correctly when there is a colon on syntax #521

efierros opened this issue Aug 6, 2021 · 9 comments

Comments

@efierros
Copy link

efierros commented Aug 6, 2021

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?

@efierros efierros changed the title Emmet not expanding corectly when there is a colon on syntax Emmet not expanding correctly when there is a colon on syntax Aug 6, 2021
@aldimhr
Copy link

aldimhr commented Oct 1, 2021

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

@efierros
Copy link
Author

efierros commented Oct 4, 2021

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.

@SpazJibo
Copy link

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.

@SpazJibo
Copy link

SpazJibo commented Jan 15, 2022

@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.

@efierros
Copy link
Author

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

@aldimhr
Copy link

aldimhr commented Jan 17, 2022

@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

@efierros
Copy link
Author

@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

@joswr1ght
Copy link

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!

@joswr1ght
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants