xi-editor / xi-editor

A modern editor with a backend written in Rust.
https://xi-editor.io
Apache License 2.0
19.81k stars 700 forks source link

[GSoC] Language Server Protocol Plugin Support #659

Open betterclever opened 6 years ago

betterclever commented 6 years ago

This is a roadmap of the the steps planned by me to add support for the Language Server Protocol (LSP) Plugin Support in the Xi Editor.

Roadmap

Will be refined over time

TODO: More refined steps after the 4th step.

Planning

The basic architecture currently planned (needs review) can be described by the following picture.

lsp-archtecture

Roadblocks / Open Questions.

cmyr commented 6 years ago

@betterclever great, I think this is a good high-level overview.

For now, I think that 'workspaces' should be managed by the plugin (the last step, here) maybe with help from the LSP library. Essentially the plugin will know every file that gets opened, and it can go looking for Cargo.toml files (or other workspace markers) and use those to figure out which files are part of which 'workspaces'.

We should consider that a single LSP client plugin, in xi, might actually be running multiple LSP sessions, if multiple workspaces are open. (I think this is how it would work?).

skyne98 commented 5 years ago

@cmyr, hey, any progress? What is the state of LSP support in Xi? Thanks!

jansol commented 5 years ago

Many (most?) bits have PRs that at least were in a relatively working state. However they got kind of stuck in a discussion of how these things should be communicated to the client... The annotations PR (#1010) is one step towards specifying that.

cmyr commented 5 years ago

@skyne98 there was a bunch of exploratory work on this this summer, but the conclusion of that was that we should step back and work on incrementally adding support for the features that will enable LSP support in the future. The issue linked above is a first step there.

ShalokShalom commented 5 years ago

Currently, the further development is stalled until this new plugin system is written: https://github.com/xi-editor/xi-editor/issues/845