Skip to content

Code actions broken on newest rust-analyzer #1037

Closed
@YaLTeR

Description

@YaLTeR
  • Did you upgrade to latest plugin version? Yes
  • Did you upgrade to/compile latest binary? Run shell command
    bin/languageclient --version to get its version number. Yes
  • (Neovim users only) Did you check output of :checkhealth LanguageClient? Yes
  • Did you check troubleshooting? Yes

Describe the bug

Starting from 2020-05-25, rust-analyzer returns no code actions to LanguageClient-neovim.

Environment

  • neovim/vim version (nvim --version or vim --version): v0.4.3
  • This plugin version (git rev-parse --short HEAD): 7c741d0
  • This plugin's binary version (bin/languageclient --version): 0.1.156
  • Minimal vimrc content (A minimal vimrc is the smallest vimrc that could
    reproduce the issue. Refer to an example here):
call plug#begin('~/.config/nvim/plugged')

Plug 'autozimu/LanguageClient-neovim', {
    \ 'branch': 'next',
    \ 'do': 'bash install.sh',
    \ }
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }

call plug#end()

augroup filetype_rust
    autocmd!
    autocmd BufReadPost *.rs setlocal filetype=rust
augroup END

" Always draw sign column. Prevent buffer moving when adding/deleting sign.
set signcolumn=yes

let g:LanguageClient_serverCommands = {
    \ 'rust': ['rust-analyzer'],
    \ }
let $RUST_BACKTRACE = 1
let g:LanguageClient_loggingLevel = 'INFO'
let g:LanguageClient_virtualTextPrefix = ''
let g:LanguageClient_loggingFile =  expand('~/.local/share/nvim/LanguageClient.log')
let g:LanguageClient_serverStderr = expand('~/.local/share/nvim/LanguageServer.log')

To Reproduce

Steps to reproduce the behavior:

  • cargo new temp
  • nvim -u min-vimrc.vim temp/src/main.rs
  • :call LanguageClient_textDocument_codeAction()

Current behavior

Code actions shown on 2020-05-18 but not on 2020-05-25 or nightly.

Expected behavior

Code actions shown.

Screenshots

image

Additional context

Log files for calling code action on 2020-05-18 and 2020-05-25:
LanguageClient-old.log
LanguageClient-new.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions