Andersbakken / rtags

A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
http://www.rtags.net
GNU General Public License v3.0
1.83k stars 252 forks source link

Language Server Protocol Proposal #947

Open sphaerophoria opened 7 years ago

sphaerophoria commented 7 years ago

Proposal for Language Server Support

I've been working on my own plugin atom-rtags-plus for a bit now and am fairly happy with the functionality. Unfortunately I've found that when working in other languages it's frustrating that each plugin has a separate set of keybindings and feature sets that need to be configured independantly. Most of the languages I write in have at least partial support for the language server protocol and I'd love to leverage that to write something that provides a consistant interface and feature set.

Protocol intro

The protocol is defined at https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md but I'll sum it up here to the best of my understanding.

Servers and clients communicate with JSON-RPC over any type of socket (can use unix io or tcp etc.). Communication is bi-directional with the ability to push commands in either direction.

I've only done a quick onceover of the api, but it seems to support most of the major functionality provided by rtags.

Benefits

Drawbacks

Proposal for a Potential Implementation

What do you think? I'm only casually familiar with the Rtags code base as well as LSP so I may have missed some details. Is this something you'd be interested in PRs for?

Andersbakken commented 7 years ago

Hi

Sorry about the delay. I've been kinda swamped. I think the proposal sounds good and would definitely be interested in a PR around this. I wouldn't mind generalizing the output formatting and the translation from JSON-RPC to RTagsMessage is the same mechanism I would choose. Looking forward to the PR.

Thanks

sphaerophoria commented 7 years ago

Cool, thanks for the input. Hopefully I'll get some time to prototype out a simple prototype during the week.

Barricade commented 4 years ago

Any update on this?