Shougo / deoplete.nvim

:stars: Dark powered asynchronous completion framework for neovim/Vim8
Other
5.94k stars 295 forks source link

Completions from other buffers #247

Closed monkoose closed 8 years ago

monkoose commented 8 years ago

Problems summary

Completions from other buffers works only when you previously edit(current session) unfocused buffer. Vim with almost identical config and neocomplete works fine. Even <C-x><C-p> doesn't help, because it shows nothing, but if you first delete one letter with <BS> when there is no pum(you don't need to delete when pum didn't popup for a current word), then you can complete from other buffers with <C-p> only for this word.

Expected

deoplete should complete words from other buffers atleast for buffers with same filetype(related to doc)

Environment Information

Linux 4.4.5-1-ARCH SMP PREEMPT Thu Mar 10 07:38:19 CET 2016 x86_64 GNU/Linux

" Your minimal init.vim
set runtimepath+=~/path/to/deoplete.nvim/
let g:deoplete#enable_at_startup = 1

The reproduce ways from neovim starting (Required!)

  1. With mininal init.vim open two files in nvim :e /path/to/file1.txt or any other filetype :e /path/to/file2.txt same filetype
  2. file1.txt must have some content, file2.txt can be empty.
  3. Do not edit file1.txt, then try to type some words in file2.txt from file1.txt
wsdjeg commented 8 years ago

yeah,can confirm,deoplete's buffer source can not load words from file1.txt,but neocomplete works well

EDIT: but in neovim,ctrl+p can complete words from file1.txt,it is same as vim ,and no issues.

Shougo commented 8 years ago

Implemented.

wsdjeg commented 8 years ago

@Shougo thanks for your work

monkoose commented 8 years ago

@Shougo Thank you a lot. Works for me. But seems like there is a problem with refreshing(screen blinks, even with vb disabled) when deoplete can't find completions for a current word. I will open a new issue.

zachcheung commented 4 years ago

same problem with latest deoplete.

Environment Information

Features: +acl +iconv +tui


 * `:checkhealth` or `:CheckHealth` result(neovim only):

health#nvim#check

Configuration

Performance

Remote Plugins

terminal

health#provider#check

Clipboard (optional)

Python 2 provider (optional)

Python 3 provider (optional)

Ruby provider (optional)

Node.js provider (optional)

health#deoplete#check

deoplete.nvim


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

```vim
set runtimepath+=~/.config/nvim/plugged/deoplete.nvim/
let g:deoplete#enable_at_startup = 1
Shougo commented 4 years ago

Please upload the reproduce instruction. If not, I will ignore your report.

zachcheung commented 4 years ago

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

  1. open file1, do nothing or input words without :w
  2. open file2, try to input word prefix of file1, no expected completion pop-up
    1. switch to file1, :w and switch back to file2, completion pop-up
Shougo commented 4 years ago

Please don't use "open files" description. It must be Vim commands.

"switch to file1" is also fuzzy instruction. It is not reproduce-able for me.

Can you ignore your report??

Shougo commented 4 years ago

Please see original reproduce instruction. Please compare your one.

I ignore the fuzzy instruction.

zachcheung commented 4 years ago

sorry about fuzzy instruction.

  1. nvim file1.txt
  2. :vs file2.txt
  3. try to input word prefix of file1.txt, no expected completion pop-up
  4. <C-w>w switch to file1.txt, :w
  5. <C-w>w switch to file2.txt, repeat step 3, completion pop-up
Shougo commented 4 years ago

OK. So I get it. I will fix it later.

Shougo commented 4 years ago

I have fixed it.

zachcheung commented 4 years ago

I have fixed it.

Thanks, it works!

zachcheung commented 4 years ago

btw, is it able for deoplete to auto complete unsaved changes in other buffers?

reproduce steps:

  1. nvim
  2. :e file1, write some words without :w
  3. :vs file2, input word of file1, no expected completion pop-up
Shougo commented 4 years ago

OK. I have added the support. Please use the latest version.

zachcheung commented 4 years ago

OK. I have added the support. Please use the latest version.

seems doesn't work, have use the latest version.

commit 3c57b8405d595ad0bc7bfa46f757cce0e8258fbb (HEAD -> master, origin/master, origin/HEAD)
Author: Shougo Matsushita <Shougo.Matsu@gmail.com>
Date:   Fri May 29 16:37:41 2020 +0900

    Add InsertLeave autocmd
Shougo commented 4 years ago

I have fixed it. Please use the latest version.

zachcheung commented 4 years ago

I have fixed it. Please use the latest version.

It rocks! Thanks to fix it, it bothers me for a bit of long time.