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

The LSP configuration on Neovim is wrong. #114

Open
JulienLecoq opened this issue Jul 26, 2024 · 0 comments
Open

The LSP configuration on Neovim is wrong. #114

JulienLecoq opened this issue Jul 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JulienLecoq
Copy link

JulienLecoq commented Jul 26, 2024

Describe the bug

According to the doc, we should just have to do:

:LspInstall v_analyzer or :MasonInstall v_analyzer

But both of them install vls from: https://github.com/v-analyzer/v-analyzer

And after doing the manipulation, vls crash on start saying that we should install the language server by doing v ls --install which isn't mentioned anywhere on the doc.

Expected Behavior

:LspInstall v_analyzer and :MasonInstall v_analyzer should install the correct vls version.

Current Behavior

Already stated before.

Reproduction Steps

Just run :LspInstall v_analyzer or :MasonInstall v_analyzer on Neovim

Possible Solution

I don't know how to fix the commands mentioned before, but you can make it work by doing this (on MacOS):

  1. Install the vls by running this command: v -e "$(curl -fsSL https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh)" in the terminal.
  2. Open the .zshrc file and export the path of the bin folder like so: export PATH="/Users/<<userName>>/.config/v-analyzer/bin:$PATH".
  3. Add the LSP configuration in Neovim like so:
local lspconfig = require('lspconfig')

lspconfig.vls.setup {
    cmd = { '/Users/<<userName>>/.config/v-analyzer/bin/v-analyzer' },
}

Additional Information/Context

No response

Environment details (v doctor output)

V full version: V 0.4.7 2cde320.52fe7c0
OS: macos, macOS, 14.5, 23F79
Processor: 12 cpus, 64bit, little endian, Apple M2 Max

getwd: ##############################
vexe: /usr/local/v/v
vexe mtime: 2024-07-26 16:19:28

vroot: OK, value: /usr/local/v
VMODULES: OK, value: /Users/<>/.vmodules
VTMP: OK, value: /tmp/v_501

Git version: git version 2.39.3 (Apple Git-146)
Git vroot status: 0.4.7-1-g52fe7c09
.git/config present: true

CC version: Apple clang version 15.0.0 (clang-1500.3.9.4)
thirdparty/tcc status: thirdparty-macos-arm64 713692d4

Editor name

Neovim

v-analyzer Version

0.0.4-beta.1.2d5d12e

VS Code Extension Version

No response

@JulienLecoq JulienLecoq added the bug Something isn't working label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant