Open ChristianChiarulli opened 3 years ago
Awesome, I was looking for emmet completions myself :) Will add this soon
@ChristianChiarulli have you tried it? Not sure I want to bundle this, as the emmet-ls lang server doesn't work too well for me.
<p></p>|
instead of <p>|</p>
Will probably add this when the npm release is updated. There are some promising commits in the repo that are not yet published.
If you want this for yourself, just add it to your config somewhere before setup()
:
require'lspinstall/servers'.emmet = {
install_script = [[
! test -f package.json && npm init -y --scope=lspinstall || true
npm install emmet-ls
]],
default_config = {
cmd = { "./node_modules/.bin/emmet-ls", "--stdio" },
filetypes = { 'html', 'css' },
root_dir = require'lspconfig'.util.root_pattern(".git", vim.fn.getcwd()),
}
}
Then you'll be able to :LspInstall emmet
@ChristianChiarulli have you tried it? Not sure I want to bundle this, as the emmet-ls lang server doesn't work too well for me.
1. completion often needs to be triggered manually (eg not automatically on type) 2. cursor position after completion is `<p></p>|` instead of `<p>|</p>`
@kabouzeid
This is how emmet-ls works for me. I had to use completion-nvim to make it work like this.
My configs are here
However, I'm switching over to use @ChristianChiarulli 's lunarvim project as a base for my new configuration.
Will probably add this when the npm release is updated. There are some promising commits in the repo that are not yet published.
Hey, just to let you know, the npm package finally got updated a couple of days ago, it's working better for me, although the integration with nvim-compe is not as good yet, there's some snippets that don't expand correctly with compe :(
@rafamadriz which snippets for example?
@kabouzeid Okay it seems like it's all working fine now, for the longest time any snippet that had $
or spaces a{Item $}
wouldn't work at all using nvim-compe. Just tried once again and those snippets get properly expanded now.
Thanks for the fast response! Sounds great, I'll give it another try, and bundle the installer in nvim-lspinstall if it's working as expected.
Should be easy since it can be install with
npm
https://github.com/aca/emmet-ls