language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Neovim: Does Volar not provide suggestions for Vue's template?

Open chaozwn opened this issue 1 year ago • 1 comments

Currently, Volar works very well on Neovim, but for some reason, component completion suggestions in HTML only appear for components that are imported in the setup.

https://github.com/vuejs/language-tools/assets/51357674/ce688ef8-56b8-4fce-81f7-ae6fe6abcd2b

chaozwn avatar Feb 07 '24 05:02 chaozwn

Does this bug still happen in the latest version?

kermanx avatar Aug 14 '24 14:08 kermanx

I still have this issue, has a solution been found?

DrWalrus1 avatar Dec 08 '24 12:12 DrWalrus1

/cc @RayGuo-ergou

KazariEX avatar Dec 08 '24 13:12 KazariEX

I remember this has been resolved long time ago, @DrWalrus1 can you confirm your LSP is up to date.

Here's a screenshot with 2.1.10

image

RayGuo-ergou avatar Dec 08 '24 22:12 RayGuo-ergou

@RayGuo-ergou Can confirm I am working with 2.1.10

Heres a screenshot Screenshot 2024-12-09 at 12 35 14 pm

Would you also be able to send you lspconfig settings for volar and ts_server as well? I'm new to setting this stuff up so it could be config too

DrWalrus1 avatar Dec 09 '24 01:12 DrWalrus1

@RayGuo-ergou Can confirm I am working with 2.1.10

Heres a screenshot Screenshot 2024-12-09 at 12 35 14 pm

Would you also be able to send you lspconfig settings for volar and ts_server as well? I'm new to setting this stuff up so it could be config too

The reality is that volar is working very well.

chaozwn avatar Dec 09 '24 02:12 chaozwn

@RayGuo-ergou Can confirm I am working with 2.1.10

Heres a screenshot Screenshot 2024-12-09 at 12 35 14 pm

Would you also be able to send you lspconfig settings for volar and ts_server as well? I'm new to setting this stuff up so it could be config too

https://github.com/user-attachments/assets/ab770290-6032-479e-aa1d-fc3217f6088f

chaozwn avatar Dec 09 '24 02:12 chaozwn

Hi all, I must apologise, after taking a look at @RayGuo-ergou nvim config I have realised a few key mistakes in my own config. I have fixed them and now I have it working successfully.

I'm going to link my config here in case any poor soul runs into the same situation and wants something to compare notes this https://github.com/DrWalrus1/nvim-config/blob/649b2ec07fccb4f721066e44d17ba6ed62fab282/lua/plugins/lspconfig.lua#L195-L244

DrWalrus1 avatar Dec 09 '24 03:12 DrWalrus1

The problem should be caused by HTML completion triggered by < which resulted in TS completion not being triggered. It requires us to manually trigger completion after <xxx.

KazariEX avatar Dec 09 '24 04:12 KazariEX

Happy to see your issue resolved.

@KazariEX I think this issue can be closed.

RayGuo-ergou avatar Dec 09 '24 07:12 RayGuo-ergou

The problem should be caused by HTML completion triggered by < which resulted in TS completion not being triggered. It requires us to manually trigger completion after <xxx.

@KazariEX I'm having this same issue. When I type my code normally, its just giving me HTML suggestions:

Image

However if I complete the brackets <>, I will get TS options (including components not imported in this file yet):

Image

How did you resolve this?

AdamGaskins avatar Oct 22 '25 16:10 AdamGaskins

I have the same issue almost. At first blink shows me components that are already imported. After i close the list and trigger it again i get the whole list. .Looks like it's the same in Vscode.

rrrrando avatar Oct 31 '25 21:10 rrrrando