[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user oxygen311 commented on the issue: https://github.com/apache/zeppelin/pull/3090 Solution must be improved to use by real users. ---
[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user mebelousov commented on the issue: https://github.com/apache/zeppelin/pull/3090 @felixcheung I agree that support of LSP in Zeppelin is unmature idea. Share please undesired cases with open ip and port. ---
[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user felixcheung commented on the issue: https://github.com/apache/zeppelin/pull/3090 open ip and port to connect to has become a huge problem recently, so unless LSP has some sort of authentication story, my vote would be "no" even if this is disabled by default, because this can become a support issue when users do have it enable. https://github.com/apache/zeppelin/pull/3090#pullrequestreview-139750764 ---
[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/3090 @oxygen311 This is what I concern about the behavior consistency. Let's assume user use PySpark (ipython is disabled). User may find code completion works pretty well in p1, but works badly in p2 because LSP only works in paragraph level. BTW, it is weird to me that LSP don't support concept of session. That would mean If I am writing a long code (1000 lines of code), I need to send all these code to LSP for code completion each time, this seems very inefficient. But I may be wrong. I am so familiar with LSP. Just want to confirm whether there's more efficient way to use LSP ---
[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user Tagar commented on the issue: https://github.com/apache/zeppelin/pull/3090 Very interesting improvements. Thanks for working on this. Shouldn't LSP server be embedded into Python / PySpark interpreter itself and not be a separate process? This would address both security concerns and ability to grasp code across paragraphs like in the above example. ---
[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/3090 Is there any session concept in LSP ? so that multiple LSP request could belong to the same session ---
[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/3090 Then it looks like LSP can only work in paragraph level. This seems not workable for users. Let's assume we also want to make PySpark support LSP. Then I guess if I type `sc.`, I will get nothing for completion, Because `sc` is created by zeppelin not by any paragraph. Is that correct ? ---
[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user oxygen311 commented on the issue: https://github.com/apache/zeppelin/pull/3090 1. LSP is usable and powerful solution: - LSP can understand imports in the start of paragraph; - We can use already made solution for every language and don't write new one; - LSP server contains much more information than we process now. E.g. it's able to show documentation of a method, reformat code, find references etc. 2-3. Now every paragraph is isolated, so `a` will not be shown. It's made because in current implementation we can not keep connection to the server (because a lot of JVMs). But maybe someone has better architecture ideas how to connect zeppelin to LSP. ---
[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/3090 1. Do you have any examples to show how much better LSP is compared to the current approach ? 2. Does the auto completion works across paragraphs ? e.g. I create string variable `a` in p1, can I get correct completion in p2 ? 3. What is the scope of LSP completion ? Is every call to LSP isolated ? ---
[GitHub] zeppelin issue #3090: [ZEPPELIN-3645] Add LSP Protocol completion support
Github user oxygen311 commented on the issue: https://github.com/apache/zeppelin/pull/3090 @zjffdu If LSP has no complete for `sc.`, iPython complete will be shown. LSP does not support sessions, but it can keep connection. ---
[GitHub] zeppelin issue #3090: [Zeppelin-3645] Add LSP Protocol completion support
Github user oxygen311 commented on the issue: https://github.com/apache/zeppelin/pull/3090 @felixcheung I have added property `zeppelin.python.useLsp` which is disabled by default. It does not seem unsecured for me now. We also can specify host and port by ourselves with `zeppelin.python.lspHost` and `zeppelin.python.lspPort` properties. ---
[GitHub] zeppelin issue #3090: [Zeppelin-3645] Add LSP Protocol completion support
Github user oxygen311 commented on the issue: https://github.com/apache/zeppelin/pull/3090 @zjffdu Sorry, correct line is `pip install python-language-server`, i will fix it. ---
[GitHub] zeppelin issue #3090: [Zeppelin-3645] Add LSP Protocol completion support
Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/3090 @oxygen311 I can not install it. Let me know if there any other dependency I need to install ``` â zeppelin pr/3090 â pip install pyls Collecting pyls Using cached https://files.pythonhosted.org/packages/de/b7/5a056c2cac8fd19c905ae7451c2a60b9195531959c3770a49d6be4d905e3/pyls-0.1.3.zip Complete output from command python setup.py egg_info: Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz Traceback (most recent call last): File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup_utils/distribute_setup.py", line 143, in use_setuptools raise ImportError ImportError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup.py", line 31, in main() File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup.py", line 11, in main distribute_setup.use_setuptools() File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup_utils/distribute_setup.py", line 145, in use_setuptools return _do_download(version, download_base, to_dir, download_delay) File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup_utils/distribute_setup.py", line 124, in _do_download to_dir, download_delay) File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup_utils/distribute_setup.py", line 193, in download_setuptools src = urlopen(url) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(*args) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: SSL is required Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/ ``` ---
[GitHub] zeppelin issue #3090: [Zeppelin-3645] Add LSP Protocol completion support
Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/3090 @oxygen311 I can not install it. Let me know if there any other dependency I need to install ``` â zeppelin pr/3090 â pip install pyls Collecting pyls Using cached https://files.pythonhosted.org/packages/de/b7/5a056c2cac8fd19c905ae7451c2a60b9195531959c3770a49d6be4d905e3/pyls-0.1.3.zip Complete output from command python setup.py egg_info: Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz Traceback (most recent call last): File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup_utils/distribute_setup.py", line 143, in use_setuptools raise ImportError ImportError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup.py", line 31, in main() File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup.py", line 11, in main distribute_setup.use_setuptools() File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup_utils/distribute_setup.py", line 145, in use_setuptools return _do_download(version, download_base, to_dir, download_delay) File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup_utils/distribute_setup.py", line 124, in _do_download to_dir, download_delay) File "/private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/setup_utils/distribute_setup.py", line 193, in download_setuptools src = urlopen(url) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(*args) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/Users/jzhang/anaconda3/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: SSL is required Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/dp/hmchg5dd3vbcvds26q91spdwgp/T/pip-install-7veml3im/pyls/ ``` ---
[GitHub] zeppelin issue #3090: [Zeppelin-3645] Add LSP Protocol completion support
Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/3090 Could you add instruction in python.md ? Otherwise it is hard for users to know how to enable this feature except you. ---
[GitHub] zeppelin issue #3090: [Zeppelin-3645] Add LSP Protocol completion support
Github user oxygen311 commented on the issue: https://github.com/apache/zeppelin/pull/3090 Now this feature is enabled only in python interpreter. So you can specify `zeppelin.python.lspHost` and `zeppelin.python.lspPort` properties and use it. Server is a separate process. I have been using [python-language-server](https://github.com/palantir/python-language-server). But there are much more [server implementations](https://microsoft.github.io/language-server-protocol/implementors/servers/) that can be used with any language. ---
[GitHub] zeppelin issue #3090: [Zeppelin-3645] Add LSP Protocol completion support
Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/3090 Is there any document of how to use this ? Like how to configure and start the LSP server ---