Shougo / deoplete.nvim

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

ternJS deoplete inserts extra single quote when completing import statement #599

Closed EdmundsEcho closed 6 years ago

EdmundsEcho commented 6 years ago

First, thank you for providing the neovim support features that you do. I have been searching and working with the deoplete docs for a while. I can't seem to figure this one out.

Problems summary

See the screenshots. Also reported by others online. The workaround seems like a hack. The parsing code in deoplete was identified as the source.

https://github.com/carlitux/deoplete-ternjs/issues/32

Expected

Accept the entry without appending the extra quote.

Environment Information

deoplete.nvim

Screen shot (if possible)

screen shot 2017-12-15 at 10 47 17 am

hit tab to select the option then enter...

screen shot 2017-12-15 at 10 48 11 am

My map bindings

" Tweaks to the IDE-like popups
" remap enter when the completion menu is open (now selects the item)
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"

" keep searching while typing <C-n> behaves like a down arrow
inoremap <expr> <C-n> pumvisible() ? "\<C-n>" :
  \ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'

inoremap <expr> <M-,> pumvisible() ? "\<C-n>" :
  \ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'

Upload the log file

2017-12-15 11:05:09,212 INFO     (deoplete.logging) NVIM v0.2.2, Python 3.6.3, neovim client 0.2.0
2017-12-15 11:05:09,216 DEBUG    (deoplete.core) on_event: Source: tag
2017-12-15 11:05:09,222 DEBUG    (deoplete.core) on_event: Source: around
2017-12-15 11:05:09,222 DEBUG    (deoplete.core) on_event: Source: buffer
2017-12-15 11:05:09,242 DEBUG    (deoplete.core) on_event: Source: dictionary
2017-12-15 11:05:11,155 DEBUG    (deoplete.core) on_event: VimLeavePre
2017-12-15 11:05:11,156 DEBUG    (deoplete.core) on_event: Source: omni
2017-12-15 11:05:11,156 DEBUG    (deoplete.core) on_event: Source: neosnippet
2017-12-15 11:05:11,184 DEBUG    (deoplete.core) on_event: Source: member
2017-12-15 11:05:11,184 DEBUG    (deoplete.core) on_event: Source: file
2017-12-15 11:05:37,387 INFO     (deoplete.logging) --- Deoplete Log Start ---
2017-12-15 11:05:37,391 INFO     (deoplete.logging) NVIM v0.2.2, Python 3.6.3, neovim client 0.2.0
2017-12-15 11:06:31,011 DEBUG    (deoplete.core) on_event: BufWritePost
2017-12-15 11:06:31,011 DEBUG    (deoplete.core) on_event: Source: tern
2017-12-15 11:06:31,011 DEBUG    (deoplete.core) on_event: Source: omni
2017-12-15 11:06:31,011 DEBUG    (deoplete.core) on_event: Source: neosnippet
2017-12-15 11:06:31,051 DEBUG    (deoplete.core) on_event: Source: member
2017-12-15 11:06:31,051 DEBUG    (deoplete.core) on_event: Source: file
2017-12-15 11:06:31,071 DEBUG    (deoplete.core) on_event: Source: tag
2017-12-15 11:06:31,104 DEBUG    (deoplete.core) on_event: Source: around
2017-12-15 11:06:31,104 DEBUG    (deoplete.core) on_event: Source: buffer
2017-12-15 11:06:31,111 DEBUG    (deoplete.core) on_event: Source: dictionary
Shougo commented 6 years ago

Unfortunately, deoplete does not support the feature. "converter_remove_overwrap" does not support the quote. I think deoplete-tenJS should not add the additional quote.

EdmundsEcho commented 6 years ago

Thank you Shougo both for the prompt reply and all the contributions you make to my enjoyment of Vim/NVIM.