8 ms·
Introducing the Python Language Server
- rahimnathwani 8y agoThis sounds awesome. Can anyone with more familiarity with how it works provide some idea of how much better this would work vs. Sublime Text plugins like djaneiro?
- AndrewDucker 8y agoIt would mean that only one Python tool has to be written for all editors, rather than a specific plugin for each editor. If Sublime Text has a better existing one then I'd stick with that until this improves.
- anentropic 8y agoat some point there will be Sublime plugins which provide their functionality via language servers using LSP there is some work towards it in projects, not sure how ready to use they are https://github.com/sourcegraph/sublime-lsp https://github.com/sourcegraph/sublime-lsp https://lsp.readthedocs.io/en/latest/#sublime-lsp-plugin-documentation https://lsp.readthedocs.io/en/latest/#sublime-lsp-plugin-doc...
- Kronuz 8y agoThere’s work in progress in a LSP fork at https://github.com/Kronuz/SublimeCodeIntel https://github.com/Kronuz/SublimeCodeIntel, it’ll have more plugins later, it currently has a few working.
- enitihas 8y agoHas anyone here used Visual Studio for python? How does it compare to Pycharm?
- hashhar 8y agoMuch faster and leaner than PyCharm. Its a lille involved to set up completions for third party libs which are not installed using pip compared to PyCharm. Completions on par with PyCharm but there are a few better refactorings in PyCharm but nothing that would make me switch back to PyCharm.
- j88439h84 8y agoWhat are "third party libs which are not installed using pip"? I install all my libs with pip.
- dagw 8y agoLots of commercial libraries aren't pip installable for example.
- heavenlyblue 8y agoCan you give an example? I've never worked with anything that's not pip-installable. Even my web backends are packaged as versioned pip packages - that's why it seems weird.
- dagw 8y agoAll the various libraries used to interact with software from companies like Autodesk and ESRI are one example.
- heavenlyblue 8y agoBut it has nothing to do with the fact that they can't do proper packaging. Using their own, proprietarily-compiled interpreter is what keeps you using their products in a controlled fashion.
- int_19h 8y agoPyQt and PySide until very recently, for example. Usually it's stuff that has large native dependencies.
- john2x 8y agoCan I use their implementation with emacs-lsp or similar? I can't find a download link for their language server as a standalone install.
- edmccard 8y agoFTA: It is available first today in the July release of the Python Extension for Visual Studio Code, and we will later release it as a standalone component that you can use with any tool that works with the Language Server Protocol.
- lozenge 8y agoThe build instructions give a dll and json files, not sure how to use that. https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING%20-%20LANGUAGE%20SERVER.md https://github.com/Microsoft/vscode-python/blob/master/CONTR...
- brettcannon 8y agoIf you look under the Visual Studio 2017 instructions it mentions where to copy those files into the extension so they will get used.
- giancarlostoro 8y agoThat's the idea behind the Language Server Protocol, and it seems they will later based on a sibling comment. I love that Microsoft helped to pioneer LSP (not Lumpy Space Princess) because there's too much of a duplicated effort done for other editors. I hope in the future they can team up with JetBrains and make the protocol even more awesome.
- brettcannon 8y agoThe protocol itself is open source: https://github.com/Microsoft/language-server-protocol https://github.com/Microsoft/language-server-protocol . I'm sure the folks in charge of it would be happy to talk to PyCharm if they wanted to contribute.
- 8y ago
- sandGorgon 8y agowe have gradually started moving away from Pycharm to vscode at my workplace and have really been happy. This feature is super important if they want to build support for running and debugging python applications remotely... or in docker (which is something we want as well).
- raeven 8y agoI'm curious as to why you'd want to move away from Pycharm?
- cdancette 8y agoNot parent but for me two main reasons would be : free, lighter / faster.
- sandGorgon 8y agoyes - vscode is far far lighter. The autocompletion,etc is not as good as pycharm...but stuff like this language server will accelerate the progress there. also pandas/numpy - vscode is not super great in debugging today, but the performance makes up for it.
- occams_chainsaw 8y agoPycharm is free
- brettcannon 8y agoThe community edition is free, the professional edition is not: https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html https://www.jetbrains.com/pycharm/features/editions_comparis...
- occams_chainsaw 8y agoThe pro edition doesn't really have anything you'd otherwise get from VScode, and even then it's still free with an @edu email, or for OSS projects, or whatever other exceptions they have, so it's basically free
- Spiritus 8y agoI wonder how it compares to Palantir’s Python Language Server[1] that uses Jedi[2] for intellisense. [1] https://github.com/palantir/python-language-server https://github.com/palantir/python-language-server [2] https://github.com/davidhalter/jedi https://github.com/davidhalter/jedi
- vetinari 8y agoMy pet peeve with Jedi is, that it doesn't support autocompletion for type libraries, that are not parsable python code. For example, anything from gi.repository (i.e. entire Gtk) is then without autocomplete. Jetbrains IDEs do support it: you have to manually generate the symbol cache for the first time, but the IDE knows your intent and maintains it for you, and for you as the user, autocomplete just works. Another thing that Jetbrains has better, is weighing the importance of symbols that are offered: Open a random Django project, try to define a model and see, where the autocomplete makes better sense.
- deleted 8y ago[deleted]
- nerdponx 8y agoThis was my question as well. Seems odd to start from scratch when this already exists. Unless the MS version is a fork of the Palantir one.
- MikhailArk 8y agoMS language server is not based on Jedi. It is based on Python Tools for Visual Studio. Core components were ported to .NET Core so it runs on all platforms. The core engine is not just for IntelliSense, it is capable of many more functions.
- purpleP 8y agoWhere can we see what it's capable of? For now it seems very incapable to me. Much worse than intellij or jedi.
- carlosperate 8y agoDoes anybody know if this is implemented in Python (I assume in a process run from the editor)? Or has it perhaps been implemented in JS/TS? The reason I ask is because the Monaco code editor from VSCode can be used in the browser, and having Python Language Server implemented in JS means that any online editor using Monaco could potentially offer the same functionality from the browser itself without having to keep a connection to a backend server doing the lifting.
- dmoreno 8y agoFrom the article: "For performance, it runs with .NET Core on Windows, macOS and Linux, works with Python 2.5 through to Python 3.7 and supports the latest language features"
- carlosperate 8y agoThanks!
- rmm 8y agoThis is awesome, tried installing Jedi with neovim on a raspberry pi and ridiculously slow. I wonder if this could fix it....
- brettcannon 8y agoThe language server currently only supports 64-bit Linux, so if you have that on your Pi then it should be faster.
- beliu 8y agoSourcegraph CTO here. This is great news and we're looking forward to incorporating this into Sourcegraph's existing Python support (https://about.sourcegraph.com/ https://about.sourcegraph.com/), so users get all the code intelligence improvements in their code reviews and code browsers. Thanks for open sourcing!