Open tjdevries opened 7 years ago
Yo!
Couple thoughts:
My goal with this new architecture was that it would be very easy for any editor that has python support for plugins would be able to implement the lsp plugin pretty quickly.
Definitely a good goal - you'll noticed I was borrowing from the good looking lsp client over at https://github.com/tbelaire/lang-server-client . Besides Vim and Sublime, are there other editors that you know of that support Python? I'm sure many editors could, but I suspect given how important LSP is going to be it's going to make sense to do it in Java for IntelliJ, JavaScript for Atom, etc. But no reason NVim and Sublime can't share some code!
Also, for any other projects folks want to do for language servers (not involving editors), could be cool to have a well-written python library to interact with them.
Regarding the long term goal of the Sublime plugin, the "Editor plugin" thing you mention, I'm thinking about how to user a lot of the code in this project: https://github.com/Microsoft/TypeScript-Sublime-Plugin - Sublime has tricky API's, and that code is pretty epic and well done. It kinda sorta already speaks LSP, but differs in a couple key respects. I think wiring up the client and the manager code to it could be the right path forward.
I wonder - is there some similarly epic Vim plugin that is written for one language that we can just wire up to the Python libs we are working on?
Thanks for looking this over!
@uforic, your sublime plugin got me thinking a lot about how to make the architecture more accessible to multiple editors (and the update got me quite excited about what you guys are planning on doing!), so I spent quite awhile tonight trying to think of maybe a better way to implement parts of the current neovim plugin.
My goal with this new architecture was that it would be very easy for any editor that has python support for plugins would be able to implement the lsp plugin pretty quickly. Also, a lot of the backend stuff would not have to be reimplimented a bunch of times between editors (as it seemed we were doing when I compared the nvim plugin to the sublime plugin).
Here's some example code of what I have been bouncing around in my head for a bit tonight.
In short it goes something like this:
lsp_client,py
that you built in the sublime repomain.py
in the sublime repoI'm sure some of this won't make sense, since I'm finishing this up at basically 2 AM my time, but I wanted to get it out there.
Let me know what you think. I can ping more people on slack for them to look at it if you think it's worthwhile. I think this could really help people make plugins quickly for their editor.