carlitux / deoplete-ternjs

deoplete.nvim source for javascript
MIT License
277 stars 24 forks source link

auto completion not working #67

Closed bmy4415 closed 5 years ago

bmy4415 commented 6 years ago

Hi, I recently installed 'deoplete-ternjs'.

I am using neovim and install your plugin via vim-plug. And my .tern-project file locates below.

/Users/bmy4415/.local/share/nvim/plugged/deoplete-ternjs/tests/.tern-project
/Users/bmy4415/.nvm/versions/node/v9.11.1/lib/node_modules/tern/.tern-project
/Users/bmy4415/.nvm/versions/node/v6.10.1/lib/node_modules/jsctags/node_modules/tern/.tern-project
/Users/bmy4415/.nvm/versions/node/v6.10.1/lib/node_modules/jsctags/node_modules/force-array/.tern-project
/Users/bmy4415/.nvm/versions/node/v6.10.1/lib/node_modules/jsctags/.tern-project
/Users/bmy4415/Desktop/.workspace/coinmanager/main_server/node_modules/gulp-webpack/node_modules/acorn/.tern-project
/Users/bmy4415/Desktop/.workspace/env/.tern-project
/Users/bmy4415/Desktop/.workspace/jwlocal/node_modules/acorn-jsx/node_modules/acorn/.tern-project
/Users/bmy4415/Desktop/.workspace/swpp_team10/frontend/customer_page/node_modules/acorn-jsx/node_modules/acorn/.tern-project
/Users/bmy4415/Desktop/.workspace/swpp_team10/frontend/signup_customer/node_modules/acorn-jsx/node_modules/acorn/.tern-project
/Users/bmy4415/Desktop/.workspace/swpp_team10/frontend/signup_store/node_modules/acorn-jsx/node_modules/acorn/.tern-project
/Users/bmy4415/Desktop/.workspace/swpp_team10/frontend/main_page/node_modules/acorn-jsx/node_modules/acorn/.tern-project
/Users/bmy4415/Desktop/.workspace/swpp_team10/frontend/store_page/node_modules/acorn-jsx/node_modules/acorn/.tern-project

And result of which tern looks like

which tern
/Users/bmy4415/.nvm/versions/node/v9.11.1/bin/tern

But nothing happened in my vim(I am editting file in /Users/bmy4415/Desktop/.workspace/jwlocal/grammar.js). I add my snippet of init.vim and screenshot.(I expect readFile, writeFile ... etc which is related to fs module).

call plug#begin('~/.local/share/nvim/plugged')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Plug 'scrooloose/syntastic'
" Plug 'zchee/deoplete-jedi'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
Plug 'airblade/vim-gitgutter'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'pangloss/vim-javascript' " javascript
Plug 'tomasr/molokai'
Plug 'w0rp/ale'
Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install -g tern' }
Plug 'Shougo/neco-syntax'

call plug#end()

" deoplete
let g:deoplete#enable_at_startup = 1

" ----- ale -----
let g:ale_linters = {'javascript': ['eslint']}
let g:ale_lint_on_text_changed = 0
let g:ale_lint_on_enter = 0
let g:ale_lint_on_save = 1
2018-05-19 18 25 16

Is there any additional setting that I must add? And I'm not sure where I locate .tern-project file to use it globally. Thanks.

carlitux commented 6 years ago

please take a look https://github.com/carlitux/deoplete-ternjs/issues/65 and the read me file https://github.com/carlitux/deoplete-ternjs.

If you have tern in your path should work with no other setup

.tern-project file should be inside your root project

carlitux commented 5 years ago

Please test last changes.