Shougo / deoplete.nvim

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

Deoplete dose not work #1100

Closed ksmxxxxxx closed 4 years ago

ksmxxxxxx commented 4 years ago

Hi, Shougo. Thanks for your product.

Please I want to help about use your deoplete. Sorry, I not good ENG. And I'm issuing an issue for the first time, so I am sorry if there is a shortage.

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

Expected

Tried

Environment Information

health#deoplete#check
========================================================================
## deoplete.nvim
  - OK: exists("v:t_list") was successful
  - OK: has("timers") was successful
  - OK: has("python3") was successful
  - OK: Require Python 3.6.1+ was successful
  - OK: Require msgpack 1.0.0+ was successful
  - INFO: If you're still having problems, try the following commands:
    $ export NVIM_PYTHON_LOG_FILE=/tmp/log
    $ export NVIM_PYTHON_LOG_LEVEL=DEBUG
    $ nvim
    $ cat /tmp/log_{PID}
    and then create an issue on github

health#denite#check
========================================================================
## denite.nvim
  - OK: has("python3") was successful
  - OK: Python 3.6.1+ was successful
  - OK: Require msgpack 1.0.0+ was successful

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: Release
    LuaJIT

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $TERM_PROGRAM='iTerm.app'
  - INFO: $COLORTERM='truecolor'

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: pbcopy

## Python 2 provider (optional)
  - INFO: Using: g:python_host_prog = "/usr/local/bin/python2"
  - INFO: Executable: /usr/local/bin/python2
  - INFO: Python version: 2.7.17
  - INFO: pynvim version: 0.4.1
  - OK: Latest pynvim is installed.

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
  - INFO: Executable: /usr/local/bin/python3
  - INFO: Python version: 3.7.7
  - INFO: pynvim version: 0.4.1
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
  - WARNING: `neovim-ruby-host` not found.
    - ADVICE:
      - Run `gem install neovim` to ensure the neovim RubyGem is installed.
      - Run `gem environment` to ensure the gem bin directory is in $PATH.
      - If you are using rvm/rbenv/chruby, try "rehashing".
      - See :help |g:ruby_host_prog| for non-standard gem installations.

## Node.js provider (optional)
  - INFO: Node.js: v14.2.0
  - INFO: Neovim node.js host: /Users/ksm/.config/yarn/global//node_modules/neovim/bin/cli.js
  - OK: Latest "neovim" npm/yarn package is installed: 4.8.0

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

let g:python_host_prog  = '/usr/local/bin/python'
let g:python3_host_prog = '/usr/local/bin/python3'
set runtimepath+=~/.cache/nvim/dein/repos/github.com/Shougo/dein.nvim
set runtimepath+=~/.cache/nvim/dein/repos/github.com/Shougo/deoplete.nvim
let g:deoplete#enable_at_startup = 1

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

  1. Install dein.nvim.
  2. Install deoplete.nvim, neosnippet, neosnippet-snippets.
  3. Call dein#install() and restart neovim.

Generate a logfile if appropriate

  1. export NVIM_PYTHON_LOG_FILE=/tmp/log
  2. export NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. nvim -u minimal.vimrc
  4. some works
  5. cat /tmp/log_{PID}

I have log file set. But...

ksm:redbear[fix_dein_files *]
$ export NVIM_PYTHON_LOG_FILE=/tmp/log
ksm:redbear[fix_dein_files *]
$ export NVIM_PYTHON_LOG_LEVEL=DEBUG
ksm:redbear[fix_dein_files *]
$ fg
nvim nvim/init.vim

[1]+  Stopped                 nvim nvim/init.vim
ksm:redbear[fix_dein_files *]
$ ps | grep nvim
 9405 ttys003    0:02.11 nvim nvim/init.vim
 9584 ttys003    0:00.00 grep nvim
ksm:redbear[fix_dein_files *]
$ cat /tmp/log_9584
cat: /tmp/log_9584: No such file or directory

Same results when Run with minimal init.vim.

Screenshot (if possible)

none.

Upload the log file

none.(Sorry)

My init.vim, dein.toml, dein_lazy.toml

init.vim

" python provide setting =========================================
let g:python_host_prog  = '/usr/local/bin/python2'
let g:python3_host_prog = '/usr/local/bin/python3'

" dein Scripts ===================================================
let s:dein_dir = expand('~/.cache/nvim/dein')
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'

" If not installed dein.vim, download from github
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^=' . fnamemodify(s:dein_repo_dir, ':p')
endif

" Start dein.vim settings
if dein#load_state(s:dein_dir)
  call dein#begin(s:dein_dir)

  let g:rc_dir    = expand("~/.config/nvim")
  let s:toml      = g:rc_dir . '/dein.toml'
  let s:lazy_toml = g:rc_dir . '/dein_lazy.toml'

  " toml cache
  call dein#load_toml(s:toml,      {'lazy': 0})
  call dein#load_toml(s:lazy_toml, {'lazy': 1})

  " End dein.vim setting
  call dein#end()
  call dein#save_state()
endif
" If not installed plugins on startup.
if dein#check_install()
  call dein#install()
endif

dein.toml

[[plugins]]
repo = 'Shougo/dein.vim'

[[plugins]]
repo = 'Shougo/vimproc.vim'
build = 'make'

[[plugins]]
repo = 'Shougo/neomru.vim'
on_path = '.*'

[[plugins]]
repo = 'Shougo/vimfiler'

[[plugins]]
repo = 'Shougo/denite.nvim'
depends = 'Shougo/neomru'
hook_add = '''
  nnoremap ,df :<C-u>DeniteBufferDir -buffer-name=files file<CR>
  nnoremap ,db :<C-u>Denite buffer -buffer-name=files file<CR>
  nnoremap ,dr :<C-u>Denite -buffer-name=register register<CR>
  nnoremap ,dm :<C-u>Denite file_mru<CR>
  nnoremap ,g  :<C-u>Denite grep<CR>
autocmd FileType denite call s:denite_my_settings()
function! s:denite_my_settings() abort
  nnoremap <silent><buffer><expr> <CR>
  \ denite#do_map('do_action')
  nnoremap <silent><buffer><expr> d
  \ denite#do_map('do_action', 'delete')
  nnoremap <silent><buffer><expr> p
  \ denite#do_map('do_action', 'preview')
  nnoremap <silent><buffer><expr> q
  \ denite#do_map('quit')
  nnoremap <silent><buffer><expr> i
  \ denite#do_map('open_filter_buffer')
  nnoremap <silent><buffer><expr> <Space>
  \ denite#do_map('toggle_select').'j'
endfunction  
'''
hook_post_source = '''
call denite#custom#option('default', 'prompt', '>')
'''

dein_lazy.toml

# ============================================================================
# Complement plugins
# ============================================================================
[[plugins]]
repo = 'Shougo/deoplete.nvim'
hook_post_add = '''
let g:deoplete#enable_at_startup = 1
'''
on_i = 1

[[plugins]]
repo = 'Shougo/neosnippet.vim'
depends = [ 'neosnippet-snippets', 'context_filetype.vim' ]
on_ft = 'snippet'
on_i  = 1
hook_add = '''
imap <C-k>     <Plug>(neosnippet_expand_or_jump)
smap <C-k>     <Plug>(neosnippet_expand_or_jump)
xmap <C-k>     <Plug>(neosnippet_expand_target)
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
'''
[[plugins]]
repo = 'Shougo/neosnippet-snippets'

[[plugins]]
repo = 'Shougo/context_filetype.vim'

[[plugins]]
repo ='carlitux/deoplete-ternjs'
hook_post_update = '''
  call system ('npm install -g tern')
'''
hook_add = '''
let g:deoplete#sources#ternjs#filetypes = [
    \ 'jsx',
    \ 'javascript.jsx',
    \ 'vue'
    \ ]
'''

[[plugins]]
repo = 'autozimu/LanguageClient-neovim'
rev = 'next'
build = 'bash install.sh'
hook_post_source = '''
set hidden
let g:LanguageClient_serverCommands = {
    \ 'vue': ['vls'],
    \ }
nnoremap <silent> K :call LanguageClient_textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient_textDocument_definition()<CR>
nnoremap <silent> <F2> :call LanguageClient_textDocument_rename()<CR>
'''

[[plugins]]
repo = 'fszymanski/deoplete-emoji'
depends = 'deoplete.nvim'
on_ft = ['markdown', 'gitcommit']
Shougo commented 4 years ago
hook_post_add = '''
let g:deoplete#enable_at_startup = 1
'''

hook_post_add does not exists in dein.vim features. You must use hook_add instead.

ksmxxxxxx commented 4 years ago

@Shougo Thank you so mach:) This Problems is resolved! šŸŽ‰ šŸ˜ƒ