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

Unable to use self-closing tags in vue files in Helix Editor #41

Closed
overbyte opened this issue Jun 20, 2024 · 7 comments
Closed

Unable to use self-closing tags in vue files in Helix Editor #41

overbyte opened this issue Jun 20, 2024 · 7 comments

Comments

@overbyte
Copy link

overbyte commented Jun 20, 2024

currently if i the do following in a JSX file in helix, I get a self closing tag, as expected:

jsx

however if i do the same thing in a .vue file i get the following result

vue

My Helix languages.toml includes the following

[language-server.emmet-lsp]
command = "emmet-language-server"
args = ["--stdio"]

[[language]]
name = "vue"
language-servers = [ "vue-language-server", "emmet-lsp"]
formatter = { command = 'prettier', args = ["--parser", "vue"] }
auto-format = true

Can you tell me if I need to do anything to the Helix config to get the LSP to respond in the right way please?

@olrtg
Copy link
Owner

olrtg commented Jun 20, 2024

Hey! The vue-language-server or volar already bundles emmet. So, you shouldn't use emmet-language-server and vue-language-server at the same time.

Having said that, and, answering your question, maybe you can report that in the volar repo. Check #25.

Hope it helps!

@overbyte
Copy link
Author

interesting - when i tried to use self/ without the emmet-lsp in the vue config, nothing happens.

thanks for the response

@olrtg
Copy link
Owner

olrtg commented Jun 20, 2024

Maybe try triggering completion yourself, in my case is ctrl + space. If that shows you the snippet to expand self/ to <self /> it means that they didn't include / as a trigger char to show the completion. Or, I saw also last week that the emmet-helper package released a new version that included some stuff for vue (microsoft/vscode-emmet-helper#93) and maybe volar just doesn't have the last version.

@overbyte
Copy link
Author

I tried using the "code action" (space-a) but that didn't do it. With all the emmet tools i've used in the past, especially in modal editors like vim, nvim and helix, the tool is always triggered in INSERT mode so i suspected this might be the case but it's always worth checking.

@overbyte
Copy link
Author

overbyte commented Jun 20, 2024

Just found the autocomplete trigger in INSERT mode (ctrl-x) as well as ctrl-space (you sometimes never know :)
) but no joy there either

@olrtg
Copy link
Owner

olrtg commented Jun 24, 2024

Hey @overbyte! just as a follow up, I saw that you've opened a issue in the helix repo, but in my opinion you're more likely to get a response if you open the issue in the volar repo. This is likely a problem with their language server and the emmet integration, I'm sure that I'll have the same problem if I were to test this in my neovim setup.

Aside from that, I'm going to close this for now since this isn't something related to this language server.
Hope that you'll get the help that you need.
Good luck!

@olrtg olrtg closed this as completed Jun 24, 2024
@overbyte
Copy link
Author

thanks @olrtg - i appreciate your help on this

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

2 participants