vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.79k stars 390 forks source link

2> version not working with helix #4683

Closed ElYaiko closed 1 month ago

ElYaiko commented 1 month ago

Vue - Official extension or vue-tsc version

-

VSCode version

-

Vue version

3.4.29

TypeScript version

5.4.0

System Info

System:
    OS: Linux Fedora 40 (Forty)
    CPU: (8) arm64 unknown
    Memory: 1.85 GB / 7.37 GB
    Container: Yes
    Shell: 5.2.26 - /bin/bash
  Binaries:
    Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.15.1/bin/npm
    bun: 1.1.23 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: beta

Steps to reproduce

  1. Open editor (helix)
  2. Open vue project
  3. LS not working as expected

What is expected?

LS to work

What is actually happening?

Using @vue/language-server version 2> with helix-editor and default configuration doesn't work, but when downgrading to version 2< (1.8.27) it works.

I also tried using helix-editor recommended config (typescript plugin), but doesn't work well.

Link to minimal reproduction

No response

Any additional comments?

No response

RayGuo-ergou commented 1 month ago

You need both tsserver and vue-language-server in v2, see https://github.com/vuejs/language-tools/issues/4376#issuecomment-2109440806.

ElYaiko commented 1 month ago

You need both tsserver and vue-language-server in v2, see #4376 (comment).

Already tried this config too, it interprets the whole doc as Typescript.

RayGuo-ergou commented 1 month ago

If tsserver apply typescript sytnex in entire vue file, to me seem you did not set up the plugin properly. Can you double check the vue plugin path

ElYaiko commented 1 month ago

If tsserver apply typescript sytnex in entire vue file, to me seem you did not set up the plugin properly. Can you double check the vue plugin path

Ok now it works, I had to write the full absolute path, instead of ~/

Also, is there a way to highlight/underline components in <template> like in VSCode?

RayGuo-ergou commented 1 month ago

Yes custom components highlight can be achieved by semanticTokensProvider. Not sure if helix supports that.

VsCode: https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#semantic-token-provider

Neovim: https://github.com/neovim/neovim/pull/21100

disabled: image

enabled: image

ElYaiko commented 1 month ago

Yes custom components highlight can be achieved by semanticTokensProvider. Not sure if helix supports that.

VsCode: https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#semantic-token-provider

Neovim: neovim/neovim#21100

disabled: image

enabled: image

It seems they don't: https://github.com/helix-editor/helix/pull/6102

Thanks for the help anyways.