Language Server Protocol

523 views
Skip to first unread message

Rob Lewis

unread,
Jun 28, 2017, 10:49:40 AM6/28/17
to BBEdit Talk
Been reading about LSP, Language Server Protocol, a new technology that lets a program like an editor communicate with a "language server" to simplify the handling of programming language-specific features. 

Wondering what Bare Bones' stance on this is. 

Kerri Hicks

unread,
Jun 28, 2017, 1:23:45 PM6/28/17
to bbe...@googlegroups.com
Correct me if I'm wrong, but doesn't LSP require that you are, essentially, sharing your code with the remote server, as you type it/edit it? That is, the remote server knows what keystrokes you're hitting when (so that it can provide you service and advice), and those are transmitted over the network?

I remember, when Kite support was added last year, that was a concern of many of us. (Kite is not an LSP, of course, but the functionality seems similar.)

Adjusting my tinfoil hat,
--Kerri

On Wed, Jun 28, 2017 at 10:26 AM, Rob Lewis <grob...@gmail.com> wrote:
Been reading about LSP, Language Server Protocol, a new technology that lets a program like an editor communicate with a "language server" to simplify the handling of programming language-specific features. 

Wondering what Bare Bones' stance on this is. 

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+unsubscribe@googlegroups.com.
To post to this group, send email to bbe...@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Sean Powell

unread,
Nov 26, 2018, 10:19:00 AM11/26/18
to BBEdit Talk
While the LSP is just a protocol, the server part of it does not need to be hosted remotely.  The "server" is generally implemented/run by the app itself (locally). Feel free to take off the hat (just this once ;).  - Sean


On Wednesday, June 28, 2017 at 1:23:45 PM UTC-4, Kerri Hicks wrote:
Correct me if I'm wrong, but doesn't LSP require that you are, essentially, sharing your code with the remote server, as you type it/edit it? That is, the remote server knows what keystrokes you're hitting when (so that it can provide you service and advice), and those are transmitted over the network?

I remember, when Kite support was added last year, that was a concern of many of us. (Kite is not an LSP, of course, but the functionality seems similar.)

Adjusting my tinfoil hat,
--Kerri
On Wed, Jun 28, 2017 at 10:26 AM, Rob Lewis <grob...@gmail.com> wrote:
Been reading about LSP, Language Server Protocol, a new technology that lets a program like an editor communicate with a "language server" to simplify the handling of programming language-specific features. 

Wondering what Bare Bones' stance on this is. 

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.

ascarter

unread,
Nov 29, 2018, 11:44:11 AM11/29/18
to BBEdit Talk
Kerri,

LSP isn't at all like Kite. It's a project primarily promoted by Microsoft but it is all open source and others are supporting it too. The problem is that all the different editors and IDE's out there use sometimes primitive means to analyze code and provide hints, suggest completions, correlate definitions, show usage, etc. Solutions like ctags work but don't run real time. The basic idea is to have each language implement a server that can answer those questions via a defined protocol in real time. The benefit is that an implementor of an editor just has to integrate the same protocol for all languages while the language implementor provides the server that can answer that for any editor or IDE.

The way it runs is not over the network. It could but that's not the intent. Instead, you run a local language server, typically as a process controlled by your editor. The editor makes JSON RPC calls to the language server usually over stdio or web sockets. It can do TCP but most seem to just do stdio. So it is all local and there is no sending of your keystrokes elsewhere.

Ideally, the language SDKs will eventually ship the language server. Go for example is beginning to add it to their standard library so if you install a future version of Go, you would get the language server as part of the sdk and your editor can run it. Since it is being implemented by the language authors, it will hopefully be very good at the tasks. However, it's fine to have it completely implemented outside the language sdk (which is how most are done now).

Microsoft is using this heavily for Visual Code.

Here are some sites that have details:

OK - so what does this have to do with BBEdit? I really love BBEdit but would like a few more IDE type features - one being the kinds of things that LSP would solve. I've started to experiment with writing some integration scripts between BBEdit and language servers. It's really early but I have some code that can talk to the Go language server (that's my primary language). I expect that it will be hard to truly integrate without some fundamental changes to BBEdit but hopefully Bare Bones will take a look at this (and I'm more than happy to share what I've learned with them).

There is a lot of momentum around this. I think it will become pretty much required for code editors to support it or they are going to really fall behind. It looks well thought out and VS Code has shown it working well. The Swift team/Apple are going to support it in Xcode and provide a server for Swift. Think of it as taking the Microsoft "intellisense" and making that available broadly in whatever editor you wanted to use.

Andrew


On Wednesday, June 28, 2017 at 10:23:45 AM UTC-7, Kerri Hicks wrote:
Correct me if I'm wrong, but doesn't LSP require that you are, essentially, sharing your code with the remote server, as you type it/edit it? That is, the remote server knows what keystrokes you're hitting when (so that it can provide you service and advice), and those are transmitted over the network?

I remember, when Kite support was added last year, that was a concern of many of us. (Kite is not an LSP, of course, but the functionality seems similar.)

Adjusting my tinfoil hat,
--Kerri
On Wed, Jun 28, 2017 at 10:26 AM, Rob Lewis <grob...@gmail.com> wrote:
Been reading about LSP, Language Server Protocol, a new technology that lets a program like an editor communicate with a "language server" to simplify the handling of programming language-specific features. 

Wondering what Bare Bones' stance on this is. 

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.

Sean Powell

unread,
Jun 28, 2019, 11:27:35 AM6/28/19
to BBEdit Talk
Excellent write up Andrew! Would you mind sharing your scripting for Go? I also write some Go but work mainly in Node/JS/TS and Elixir.  I would love to mimic what you're doing with Go as I've never implemented a plugin for BBEdit.  
Reply all
Reply to author
Forward
0 new messages