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

V and Vue seem incompatible #6267

Closed
bfg-coding opened this issue Mar 11, 2023 · 4 comments
Closed

V and Vue seem incompatible #6267

bfg-coding opened this issue Mar 11, 2023 · 4 comments
Labels
C-bug Category: This is a bug

Comments

@bfg-coding
Copy link

Summary

I've downloaded V and got it's lsp setup but for some reason when I use :set-language to V it seems to be using my Vue lsp as my auto completes are showing Vue things but the syntax highlighting is in V. They have the same name in the hx --health vls but when I look at the language.toml I don't see anything that seems to be causing Helix to confuse the use of two.

Is anyone else having this issue when they have both vue and v lsp installed on their machine?

Reproduction Steps

I tried this:

  1. open v file hx . in a V project
  2. run :set-language and select V as there is another bug being reported on some file name oddities
    3 . Trigger code suggestion

I expected this to happen:

see V code suggestion and autocompletion

Instead, this happened:

I see Vue's suggestion and auto completion

Helix log

2023-03-10T14:04:46.381 helix_view::editor [ERROR] Failed to initialize the LSP for source.verilog { cannot find binary path }
2023-03-10T14:05:21.311 helix_view::editor [ERROR] Failed to initialize the LSP for source.verilog { cannot find binary path }
2023-03-10T14:12:40.584 helix_view::editor [ERROR] Failed to initialize the LSP for source.verilog { cannot find binary path }
2023-03-10T14:13:13.834 helix_term::application [ERROR] Language Server: Method not found client/registerCapability
2023-03-10T14:13:14.068 helix_term::application [ERROR] Language Server: Method not found window/showMessageRequest
2023-03-10T14:13:14.068 helix_term::application [ERROR] Language Server: Method not found window/showMessageRequest
2023-03-10T21:50:56.799 helix_view::editor [ERROR] Failed to initialize the LSP for source.verilog { cannot find binary path }
2023-03-10T21:51:04.875 helix_term::application [ERROR] Language Server: Method not found client/registerCapability
2023-03-10T21:51:05.110 helix_term::application [ERROR] Language Server: Method not found window/showMessageRequest
2023-03-10T21:51:05.110 helix_term::application [ERROR] Language Server: Method not found window/showMessageRequest
2023-03-10T21:55:14.994 helix_view::editor [ERROR] Failed to initialize the LSP for source.verilog { cannot find binary path }
2023-03-10T21:55:22.243 helix_term::application [ERROR] Language Server: Method not found client/registerCapability
2023-03-10T21:55:22.474 helix_term::application [ERROR] Language Server: Method not found window/showMessageRequest
2023-03-10T21:55:22.474 helix_term::application [ERROR] Language Server: Method not found window/showMessageRequest
2023-03-10T22:03:27.299 helix_view::editor [ERROR] Failed to initialize the LSP for source.verilog { cannot find binary path }
2023-03-10T22:03:33.486 helix_term::application [ERROR] Language Server: Method not found client/registerCapability
2023-03-10T22:03:33.716 helix_term::application [ERROR] Language Server: Method not found window/showMessageRequest
2023-03-10T22:03:33.716 helix_term::application [ERROR] Language Server: Method not found window/showMessageRequest

Platform

Linux

Terminal Emulator

Alacritty

Helix Version

helix 22.05 (1de17a2)

@bfg-coding bfg-coding added the C-bug Category: This is a bug label Mar 11, 2023
@erasin
Copy link
Contributor

erasin commented Mar 11, 2023

Look at #6164 (comment)

@bfg-coding
Copy link
Author

I'm on that comment thread and this is a different problem. Once the language is set with :set-language I'm seeing vue auto complete instead of V's

@erasin
Copy link
Contributor

erasin commented Mar 12, 2023

Sorry I didn't notice the lsp issue, I back to the release 22.05 version for testing.

This is an lsp configuration error for v.

22.05

helix/languages.toml

Lines 1457 to 1463 in 1de17a2

[[language]]
name = "v"
scope = "source.v"
file-types = ["v", "vv"]
shebangs = ["v run"]
roots = ["v.mod"]
language-server = { command = "vls", args = [] }

It has fixed in master branch.

helix/languages.toml

Lines 1686 to 1692 in 14f1a62

[[language]]
name = "v"
scope = "source.v"
file-types = ["v", "vv"]
shebangs = ["v run"]
roots = ["v.mod"]
language-server = { command = "v", args = ["ls"] }

ref: https://github.com/vlang/vls#via-v-cli-recommended, vls has change to 'v ls' from 0.3.1.
Vue's language server is also vls,So there is a conflict in the 22.05 version.

You can wait for the next version, or set your own configuration
.config/helix/languages.toml

[[language]]
name = "v"
file-types = ["v", "vv"]
language-server = { command = "v", args = ["ls"] }

[[grammar]]
name = "v"
source = { git = "https://github.com/vlang/vls", subpath = "tree_sitter_v", rev = "66cf9d3086fb5ecc827cb32c64c5d812ab17d2c6" }

Because vlang changes quickly, hx's support for languages sometimes needs to be updated by configuring languages.toml itself.

@the-mikedavis
Copy link
Member

Yeah this is fixed on master by #5677 since vlang changed its binary for the language server (vls became v ls)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants