deoplete-plugins / deoplete-lsp

LSP Completion source for deoplete

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LSP specific complementary operation has not been realized

nabezokodaikon opened this issue · comments

Problems summary

LSP specific complementary operation has not been realized.

Expected

LSP specific complementary operation is realized.

Environment Information

  • deoplete-lsp version (SHA1): e526dbe

  • OS: Mac

  • neovim/Vim :version output: NVIM v0.5.0-dev+nightly-835-g5d9c56012

  • :checkhealth or :CheckHealth result(neovim only): OK

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

if &compatible
    set nocompatible
endif

filetype off
filetype plugin indent off

let $CACHE = expand('~/.cache')
if !isdirectory(expand($CACHE))
    call mkdir(expand($CACHE), 'p')
endif
let s:dein_dir = expand('$CACHE/dein')
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'
if &runtimepath !~# '/dein.vim'
    if !isdirectory(s:dein_repo_dir)
        execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_dir
    endif
    execute 'set runtimepath^=' . s:dein_repo_dir
endif
if !dein#load_state(s:dein_dir)
    finish
endif
call dein#begin(s:dein_dir, expand('<sfile>'))
call dein#add('Shougo/deoplete.nvim')
call dein#add('deoplete-plugins/deoplete-lsp')
call dein#add('neovim/nvim-lspconfig')
call dein#end()
call dein#save_state()
if has('vim_starting') && dein#check_install()
    call dein#install()
endif

filetype plugin indent on

call deoplete#enable()
lua require'lspconfig'.rust_analyzer.setup {}

How to reproduce the problem from neovim/Vim startup (Required!)

  1. Install Rust
    * curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Install rust-analyzer
    * Place rust-analyzer to rust-analyzer where the path passes.
  3. cargo new foo
  4. cd foo
  5. nvim src/main.rs
  6. Type the following:
struct Point {
    x: f64,
    y: f64,
}
fn main() {
    let p = Point::from(1.0);
    p.x;
}
  1. Completion is displayed after entering the semicolon.

Screenshot (if possible)

スクリーンショット 2021-05-21 19 43 42

For languages with a semicolon at the end, if you change line 76 of the lsp.py file to the following, this reduction will not occur.

self.input_pattern = r'[^\w\s;]$'

This symptom did not occur in the following items.

  • completion-nvim
  • coc.nvim
  • VSCode

Thank you.