Comments (38)
Just for update, I moved the javascript completion into a standalone plugin
Plug 'roxma/nvim-cm-tern', {'do': 'npm install'}
Since the npm install
required for this plugin might lead to confusion for those not being familliar with javascript.
from nvim-completion-manager.
Plug 'roxma/nvim-completion-manager', {'do': 'npm install'}
If you are not using vim-plug, go to the directory of this plugin and execute npm install
after installing this plugin.
from nvim-completion-manager.
If npm install
doesn't work, use NVIM_PYTHON_LOG_FILE=nvim.log NVIM_PYTHON_LOG_LEVEL=INFO nvim
to start neovim, this will generate some log files with the nvim.log_*
prefix on your current working directory, then check the content of nvim.log_py3_cm_tern
from nvim-completion-manager.
Perfect! thanks @roxma, will get right back to you on that.
from nvim-completion-manager.
unfortunately, this is all I'm seeing:
2017-02-04 19:55:57,186 [INFO @ session.py:request:97] 93455 - 'Received error: [0, b'Failed to evaluate expression']
2017-02-04 19:55:57,186 [INFO @ cm.py:main:270] 93455 - Exception: b'Failed to evaluate expression'
from nvim-completion-manager.
Also, of note, npm i
does run as expected with vim-plug
.
from nvim-completion-manager.
open a javascripot file, check the result of these two command:
:echo split(globpath(&rtp,"node_modules/tern/bin/tern"),"\n")[0]
:echo [expand("%:p"),&filetype]
from nvim-completion-manager.
@roxma, should i open the JS file from nvim-completion-manager
dir?
from nvim-completion-manager.
don't have to be nvim-completion-manager
dir
from nvim-completion-manager.
this commit may fix this issue, possibly, update the plugin, and try it out. I also add some more logs for helpful infomation.
from nvim-completion-manager.
hmm. my only thought is that the:
first:
E684: list index out of range: 0
E15: Invalid expression: split(globpath(&rtp,"node_modules/tern/bin/tern"),"\n")[0]
second:
['/Users/me/code/helpers.js', 'javascript.jsx']
it is indeed installed, confirmed (despite it not finding it). i also confirmed my runtimepath does indeed point to my ~/.config/nvim/plugged/nvim-completion-manager/
, and this path exists therein: node_modules/tern/bin/tern
.
from nvim-completion-manager.
Oh, I need to check for some more commands:
:echo globpath(&rtp,"node_modules/tern/bin/tern")
:echo &rtp
may be helpful for me reproducing this issue
from nvim-completion-manager.
bummer.. i see it installed in the location i'm expecting.. is it that my runtimepath is a little whacky? i see the path to the n-c-m
plugin if i :echo &rtp
from nvim-completion-manager.
@roxma, the result from : echo &rtp
/Users/megalithic/.config/nvim,/Users/megalithic/.config/nvim/plugged/base16-vim/,/Users/megalithic/.config/nvim/plugged/oceanic-next/,/Users/megalithic/.config/nvim/plugged/vim-airline/,/Users/megalithic/.config/nvim/plugged/vim-airline-themes/,/Users/megalithic/
.config/nvim/plugged/golden-ratio/,/Users/megalithic/.config/nvim/plugged/yajs.vim/,/Users/megalithic/.config/nvim/plugged/vim-javascript/,/Users/megalithic/.config/nvim/plugged/vim-js-indent/,/Users/megalithic/.config/nvim/plugged/vim-javascript-syntax/,/Users/seth
.messer/.config/nvim/plugged/es.next.syntax.vim/,/Users/megalithic/.config/nvim/plugged/vim-jsx/,/Users/megalithic/.config/nvim/plugged/javascript-libraries-syntax.vim/,/Users/megalithic/.config/nvim/plugged/jspc.vim/,/Users/megalithic/.config/nvim/plugged/vim-flow/
,/Users/megalithic/.config/nvim/plugged/vim-node/,/Users/megalithic/.config/nvim/plugged/vimproc.vim/,/Users/megalithic/.config/nvim/plugged/vim-git/,/Users/megalithic/.config/nvim/plugged/vim-fugitive/,/Users/megalithic/.config/nvim/plugged/vimagit/,/Users/seth.me
sser/.config/nvim/plugged/vim-conflicted/,/Users/megalithic/.config/nvim/plugged/gist.vim/,/Users/megalithic/.config/nvim/plugged/elm-vim/,/Users/megalithic/.config/nvim/plugged/vim-misc/,/Users/megalithic/.config/nvim/plugged/neomake/,/Users/megalithic/.config/nvi
m/plugged/vim-commentary/,/Users/megalithic/.config/nvim/plugged/vim-pasta/,/Users/megalithic/.config/nvim/plugged/VimAutoMakeDirectory/,/Users/megalithic/.config/nvim/plugged/vim-surround/,/Users/megalithic/.config/nvim/plugged/vim-repeat/,/Users/megalithic/.confi
g/nvim/plugged/auto-pairs/,/Users/megalithic/.config/nvim/plugged/lexima.vim/,/Users/megalithic/.config/nvim/plugged/rainbow_parentheses.vim/,/Users/megalithic/.config/nvim/plugged/closetag.vim/,/Users/megalithic/.config/nvim/plugged/vim-endwise/,/Users/megalithic/
.config/nvim/plugged/mirror.vim/,/Users/megalithic/.config/nvim/plugged/codi.vim/,/Users/megalithic/.config/nvim/plugged/iron.nvim/,/Users/megalithic/.config/nvim/plugged/neoformat/,/Users/megalithic/.config/nvim/plugged/vim-readdir/,/Users/megalithic/.config/nvim/
plugged/vim-tmux-navigator/,/Users/megalithic/.config/nvim/plugged/vim-tmux-runner/,/Users/megalithic/.config/nvim/plugged/vim-tmux-focus-events/,/Users/megalithic/.config/nvim/plugged/quick-scope/,/Users/megalithic/.config/nvim/plugged/DidYouMean/,/Users/seth.messe
r/.config/nvim/plugged/vim-cursorword/,/Users/megalithic/.config/nvim/plugged/incsearch.vim/,/Users/megalithic/.config/nvim/plugged/incsearch-fuzzy.vim/,/Users/megalithic/.config/nvim/plugged/vim-search-pulse/,/Users/megalithic/.config/nvim/plugged/FastFold/,/Users/
megalithic/.config/nvim/plugged/deoplete.nvim/,/Users/megalithic/.config/nvim/plugged/deoplete-ternjs/,/Users/megalithic/.config/nvim/plugged/echodoc.vim/,/Users/megalithic/.config/nvim/plugged/nvim-completion-manager/,/Users/megalithic/.config/nvim/plugged/context
_filetype.vim/,/Users/megalithic/.config/nvim/plugged/tern_for_vim/,/Users/megalithic/.fzf/,/Users/megalithic/.config/nvim/plugged/ultisnips/,/Users/megalithic/.config/nvim/plugged/vim-snippets/,/Users/megalithic/.config/nvim/plugged/vim-es2015-snippets/,/Users/set
h.messer/.config/nvim/plugged/vim-react-snippets/,/Users/megalithic/.config/nvim/plugged/vim-esearch/,/Users/megalithic/.config/nvim/plugged/vim-operator-user/,/Users/megalithic/.config/nvim/plugged/vim-textobj-user/,/Users/megalithic/.config/nvim/plugged/vim-textob
j-indent/,/Users/megalithic/.config/nvim/plugged/vim-indent-object/,/Users/megalithic/.config/nvim/plugged/targets.vim/,/etc/xdg/nvim,/Users/megalithic/.local/share/nvim/site,/usr/local/share/nvim/site,/usr/share/nvim/site,/usr/local/Cellar/neovim/0.1.7/share/nvim/ru
ntime,/usr/share/nvim/site/after,/usr/local/share/nvim/site/after,/Users/megalithic/.local/share/nvim/site/after,/etc/xdg/nvim/after,/Users/megalithic/.config/nvim/plugged/oceanic-next/after,/Users/megalithic/.config/nvim/plugged/vim-javascript/after,/Users/seth.mess
er/.config/nvim/plugged/es.next.syntax.vim/after,/Users/megalithic/.config/nvim/plugged/vim-jsx/after,/Users/megalithic/.config/nvim/plugged/javascript-libraries-syntax.vim/after,/Users/megalithic/.config/nvim/plugged/jspc.vim/after,/Users/megalithic/.config/nvim/pl
ugged/vim-flow/after,/Users/megalithic/.config/nvim/plugged/tern_for_vim/after,/Users/megalithic/.config/nvim/plugged/ultisnips/after,/Users/megalithic/.config/nvim/after
from nvim-completion-manager.
thanks again for helping to debug this!
from nvim-completion-manager.
additional logs with your commit:
2017-02-04 20:25:42,094 [INFO @ cm_tern.py:__init__:83] 74997 - eval for tern: split(globpath(&rtp,"node_modules/tern/bin/tern"),"\n")[0]
2017-02-04 20:25:42,095 [INFO @ session.py:request:97] 74997 - 'Received error: [0, b'Failed to evaluate expression']
2017-02-04 20:25:42,095 [INFO @ cm.py:main:270] 74997 - Exception: b'Failed to evaluate expression'
from nvim-completion-manager.
I'm missing the result of this command, :echo globpath(&rtp,"node_modules/tern/bin/tern")
from nvim-completion-manager.
@roxma that returns an empty string. :/
from nvim-completion-manager.
:help globpath
on vim should give you the information on how this plugin find the tern executable
If globpath doesn't work as expected, this may be a neovim issue.
Anyway, I may use pure python implementation workaround for finding the tern executable
from nvim-completion-manager.
oh right on.. in the meantime, here's a screenshot of the actual location. i'll read up on globpath real quick too. thanks again!
https://www.dropbox.com/s/9urhc3eysud7s7v/Screenshot%202017-02-04%2020.34.21.png?dl=0
from nvim-completion-manager.
@roxma, interesting, if i glob for node_modules in the plugin folder, it returns the only 2 plces that i've installed npm modules for neovim plugins:
['/Users/megalithic/.config/nvim/plugged/nvim-completion-manager/node_modules', '/Users/megalithic/.config/nvim/plugged/tern_for_vim/node_modules']
from nvim-completion-manager.
however, if i glob any further past node_modules/
, using :echo globpath(&rtp, "node_modules/tern", 0, 1)
, it returns an empty array. :/
from nvim-completion-manager.
Is there any special file/directory permission under the node_modules directory?
from nvim-completion-manager.
hah, i was just asking about that in freenode#neovim. will read up a bit more about it and see if there is something specific for node_modules in a plugin folder. just seems so odd that it would be.
from nvim-completion-manager.
@roxma: maybe my wildignores settings could be causing this? let me dig a bit further. we're almost there!
from nvim-completion-manager.
YEP! that was it! ok, now that i have that figured out; will just let my .gitignore and .agignore handle it.
anyway, @roxma, here's the output of the tern logging with your handle logging trick:
2017-02-04 20:58:03,364 [INFO @ cm_tern.py:__init__:83] 61190 - eval for tern: split(globpath(&rtp,"node_modules/tern/bin/tern"),"\n")[0]
2017-02-04 20:58:04,584 [INFO @ cm.py:main:270] 61190 - Exception: 'NoneType' object has no attribute 'group'
from nvim-completion-manager.
So this should produce the expected result?
:echo globpath(&rtp,"node_modules/tern/bin/tern",1)
from nvim-completion-manager.
yep, here is the output from the above:
/Users/megalithic/.config/nvim/plugged/nvim-completion-manager/node_modules/tern/bin/tern
/Users/megalithic/.config/nvim/plugged/tern_for_vim/node_modules/tern/bin/tern
from nvim-completion-manager.
I've committed this fix, let's check if it is working
from nvim-completion-manager.
2017-02-04 21:06:04,234 [INFO @ cm_tern.py:__init__:83] 82979 - eval for tern: split(globpath(&rtp,"node_modules/tern/bin/tern",1),"\n")[0]
2017-02-04 21:06:04,350 [INFO @ cm.py:main:270] 82979 - Exception: 'NoneType' object has no attribute 'group'
from nvim-completion-manager.
Oh,
what's the output when you execute
/Users/megalithic/.config/nvim/plugged/nvim-completion-manager/node_modules/tern/bin/tern
on your shell?
from nvim-completion-manager.
bah, man, i'm so sorry, i should have tried that already. there is an issue with my ~/.tern-project file. wow, man, again, so sorry for putting you through all this. so embarrassing. :(
from nvim-completion-manager.
i'm going to close this issue. thank you once more for sticking with this to help me debug the issue. i learned a lot with this. thank you again for your great plugin!
from nvim-completion-manager.
Thank you for helping it get better!
from nvim-completion-manager.
my absolute pleasure!
from nvim-completion-manager.
@roxma +1 for moving th completions to a separate repo. I would also love seeing rest of the language completions move.
from nvim-completion-manager.
@roxma Thanks for the new plug, but it might be better if we implement the completion within NCM. This way of a plugin for a plugin(like Deoplete's approach) could be a little too much, in my opinion.
from nvim-completion-manager.
@roxma thanks for the heads up! well done sir.
from nvim-completion-manager.
Related Issues (20)
- Quick question: Using tab to expand whatever is selected in popup menu
- Add support for .tex // Doesn't work for snippets in .tex files HOT 3
- does not autocomplete with some tags
- [Question] Is there somewhere a list of sources defined? HOT 8
- COBOL support HOT 1
- UltiSnips in VISUAL
- Don't show autocompletion popup after navigation keystrokes HOT 20
- how to directly autocompletion when I typed <cr> HOT 1
- Support โsmartโ filtering of autocomplete suggestons HOT 1
- Overwriting priority for a built-in completer HOT 2
- get โnvim-completion-manager core channel terminated.โ everytime i edit a file in terminal env. HOT 7
- c key switches straight into insert mode HOT 3
- very high CPU rate HOT 3
- Disable a source when another is active HOT 2
- Completion not working anymore when using cquery
- Parameter expansion with ultisnips disables semantic clang completion
- How to customize python path for jedi complemention? HOT 1
- Completion shows part of the snippet HOT 1
- Word pattern for "Word from current buffer"
- Error in logger on startup HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-completion-manager.