Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant seem to integrate tern with autocomplete #131

Open
colbycheeze opened this issue Mar 3, 2016 · 3 comments
Open

Cant seem to integrate tern with autocomplete #131

colbycheeze opened this issue Mar 3, 2016 · 3 comments

Comments

@colbycheeze
Copy link

I've tried multiple installs, tutorials, multiple versions of Vim...(currently running NeoVim atm)

I've set up YouCompleteMe and it won't work, and now tried Deoplete and it doesn't work either.

The tern settings are correct, as I have it working perfectly with Atom. It's just Vim that won't complete properly or do any pop up menus etc.

Here is a gif of what it's showing...which is really weird to me. I can call :TernDoc but the PUM never comes up otherwise.
example

I've spent countless hours googling and troubleshooting to the point despair lol. Totally baffled... any ideas?

Here are my settings that seem to be related:

" supertab makes tab work with autocomplete and ultisnips
Plug 'ervandew/supertab'
" Provides Async autocomplete with Tern
Plug 'https://github.com/Shougo/deoplete.nvim'
" IDE like code intelligence for Javascript
Plug 'ternjs/tern_for_vim', {'do': 'npm install'}

...

" [10] make YCM compatible with UltiSnips (using supertab)
let g:SuperTabDefaultCompletionType = '<C-n>'

let g:deoplete#enable_at_startup = 1
if !exists('g:deoplete#omni#input_patterns')
  let g:deoplete#omni#input_patterns = {}
endif
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif

" omnifuncs
augroup omnifuncs
  autocmd!
  autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
  autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
  autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
  autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
augroup end

" tern
if exists('g:plugs["tern_for_vim"]')
  let g:tern_show_argument_hints = 'on_hold'
  let g:tern_show_signature_in_pum = 1

  autocmd FileType javascript setlocal omnifunc=tern#Complete
endif
@nemild
Copy link

nemild commented Mar 23, 2016

For YouCompleteMe, have you installed using:
./install.py --tern-completer

You can see more instructions here.

If so, have you isolated the problem to YCM or Deoplete vs tern_for_vim? Does YCM or Deoplete work?

@christopher-francisco
Copy link

Did you manage to solve this?

I have installed both YouCompleteMe and tern_for_vim, but not sure if I'm missing something. I'm getting a Value Error: Not connected to server

@christopher-francisco
Copy link

Nevermind, I had a syntax error in my .tern-project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants