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

Rust LSP error when not using "real" terminal #301

Closed
kedare opened this issue Apr 26, 2021 · 7 comments
Closed

Rust LSP error when not using "real" terminal #301

kedare opened this issue Apr 26, 2021 · 7 comments

Comments

@kedare
Copy link

kedare commented Apr 26, 2021

I have been trying to use the rust LSP

It works fine when using nvim from a terminal,

But when trying it using different frontends like goneovim or neovide, the LSP initialization fail with the following error

image

I'm not sure if I should open the issue here, in neovim, LSP or Rust LSP project. Let me know if I should put it somewhere else

Thanks

@rebuilt
Copy link
Collaborator

rebuilt commented Apr 27, 2021

Launch with a configuration file and see if you get errors.

neovide -u NONE

If it still errors, you can rule out LunarVim.

Also run :checkhealth to make sure there are no glaring errors.
Some versions of neovim 0.5 are still buggy. If you haven't already, try compiling a newer version of it.

@kedare
Copy link
Author

kedare commented Apr 28, 2021

Neovide won't start with the given command

neovide -u NONE
Ignored client type property: "methods"
Ignored client type property: "attributes"
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /home/mpoussin/.cache/yay/neovide/src/neovide/CARGO/git/checkouts/skribo-3c422fce25a33836/a35c876/src/collection.rs:130:32

What is the -u doing exactly ?

About my versions

$ neovide --version
Neovide version: 0.7.0


$ nvim --version
NVIM v0.5.0-dev+1205-g3f7cd18c4
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/mpoussin/.cache/yay/neovim-nightly-git/src/build/config -I/home/mpoussin/.cache/yay/neovim-nightly-git/src/neovim-nightly-git/src -I/usr/include -I/home/mpoussin/.cache/yay/neovim-nightly-git/src/build/src/nvim/auto -I/home/mpoussin/.cache/yay/neovim-nightly-git/src/build/include
Compiled by mpoussin@mpoussin-thinkpad

Features: +acl +iconv +tui

From the checkhealth, I see that the RPC part is failing on GUI (timeout) and working on TUI.

@rebuilt
Copy link
Collaborator

rebuilt commented Apr 28, 2021

The -u flag tells neovide to start with the given config: NONE. It's starting up with no configuration files at all.

Do you have a graphics driver installed? Neovide relies on graphics acceleration for performance gains.

The error is suggesting you type the following in console

sysctl dev.i915.perf_stream_paranoid=0

@kedare
Copy link
Author

kedare commented Apr 29, 2021

I do have GPU acceleration (working fine on other applications), I ran the sysctl before trying again but I am getting the same issue, should I ask directly in the neovide repository ?

EDIT: Found the issue neovide/neovide#527

When opening with neovide -u NONE it opens fine, but of course I don't get the rust syntax/completion properly when opening a rust file (so no error like before as it is not doing anything)

Do I have any way to know which line of code/configuration triggers this error ? (the initial one on the screenshot), I suspect it is coming from lspconfig but I am not sure.

@rebuilt
Copy link
Collaborator

rebuilt commented Apr 29, 2021

I'm not sure what's going on but I think the key to figuring it out willl be the line. home/mpoussin/.cache/yay/neovide/src/neovide/CARGO/git/checkouts/skribo-3c422fce25a33836/a35c876/src/collection.rs:130:32

Try starting from a different, fresh directory and seeing if it still fails. Looks like neovide is storing something in a cache file.

@rebuilt
Copy link
Collaborator

rebuilt commented Apr 29, 2021

#269

@kedare
Copy link
Author

kedare commented Apr 29, 2021

For the neovide issue, I could get it working by following neovide/neovide#527

Installing a specific font fix the issue (noto-fonts package on arch)

But I still have the initial issue (not a terminal, from rust rls), I could not find a way to find from where is this error coming exactly ?

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

3 participants