carlitux / deoplete-ternjs

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

it cannot work in vue #76

Closed glepnir closed 5 years ago

glepnir commented 5 years ago

I got these error when i edit vue file, but it work in js file Exception in thread Request Completion: Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/Users/marblues/.local/share/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 318, in completation data = self.run_command(command, pos) File "/Users/marblues/.local/share/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 259, in run_command data = self.make_request(doc, silent) File "/Users/marblues/.local/share/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 227, in make_request req = opener.open(self._url, payload) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open '_open', req) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1345, in http_open return self.do_open(http.client.HTTPConnection, req) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1320, in do_open r = h.getresponse() File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1321, in getresponse response.begin() File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 296, in begin version, status, reason = self._read_status() File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 265, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response Press ENTER or type command to continue

carlitux commented 5 years ago

I don't know if vue needs some ternjs plugin/parser. The source code maybe is crashing it.

glepnir commented 5 years ago

@carlitux hi, Vue is composed of three parts.template,script,style,I will write ES6 in the script.Does deoplete-ternjs not support ES6 completion in vue?

carlitux commented 5 years ago

hi, I never edited vue projects with tern. Already you have to confirm tern is able to do this and setup .tern-project to do that. deoplete-ternjs just send the requests to tern.

glepnir commented 5 years ago

嗨,我从来没有编辑过vue项目tern。您必须确认tern能够执行此操作并设置.tern-project才能执行此操作。deoplete-ternjs只是发送请求tern

I am not sure that my .tern-project is set up correctly, but when I edit the js file, deoplete-ternjs works fine.