Closed AlexMasterov closed 7 years ago
@AlexMasterov could you paste your config?
Also take a look at this https://github.com/carlitux/deoplete-ternjs/issues/25 most of the errors on this is about how your plugins works. Many developers install plugins to pair quotes or snippets that modify source code.
The source only has to return candidacies and deoplete insert into the buffer. Maybe we can try to find a way to hack this and implement some way to pair the quotes.
@carlitux thanks for such a quick reply.
With <C-x><C-o>
: modules not showing in suggestions.
With deoplete#manual_complete()
trigger: only '|
and 'react-|
works, but adds quote pairs.
Minimal config for testing:
nvim
" deoplete.nvim
inoremap <silent> <expr> <Tab> pumvisible() ? "\<C-n>" : deoplete#mappings#manual_complete()
" deoplete-ternjs
let g:deoplete#sources = {}
let g:deoplete#sources.javascript = ['ternjs']
" tern_for_vim
let g:deoplete#omni#functions = {}
let g:deoplete#omni#functions.javascript = ['tern#Complete']
let g:deoplete#omni_patterns = {}
let g:deoplete#omni_patterns.javascript = '\h\w*\|\h\w*\.\%(\h\w*\)\|[^. \t]\.\%(\h\w*\)'
.tern-project
{
"libs": [
"ecmascript",
"browser"
],
"plugins": {
"es_modules": {},
"node_resolve": {},
"requirejs": {
"baseURL": "./",
"paths": {}
},
"doc_comment": {}
},
"loadEagerly": [
"src/*.js"
]
}
@AlexMasterov @razor-x @wavded
Please update and review, looking at https://github.com/zchee/deoplete-jedi/blob/master/rplugin/python3/deoplete/sources/deoplete_jedi.py I found the way to enable import and require autocomplete so you don't need to call deoplete#manual_complete()
any more.
Please test and let me know if something is wrong, few times is not autocompleting for me maybe something missed on regular expression if any of you have time to review the REs please do a pull request.
Here is where you can see the regular expresions.
@AlexMasterov on your screenshoots I see you are using react. The issue I found happens when
I have it works
import React from 'rea
and here it stops working (most the time)
import React from 'reac
But when deleting with backspace start completing again.
Please confirm
Works fine :+1: Thank you!
deoplete-ternjs
tern_for_vim