Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rewrite lsp to use lspower #8727

Merged
merged 9 commits into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 125 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ atty = "0.2.14"
base64 = "0.12.3"
byteorder = "1.3.4"
clap = "2.33.3"
crossbeam-channel = "0.5.0"
dissimilar = "1.0.2"
dprint-plugin-typescript = "0.35.1"
encoding_rs = "0.8.24"
Expand All @@ -52,8 +51,7 @@ jsonc-parser = "0.14.0"
lazy_static = "1.4.0"
libc = "0.2.77"
log = "0.4.11"
lsp-server = "0.5.0"
lsp-types = { version = "0.84.0", features = ["proposed"] }
lspower = "0.1.0"
notify = "5.0.0-pre.3"
percent-encoding = "2.1.0"
regex = "1.3.9"
Expand Down Expand Up @@ -87,6 +85,7 @@ chrono = "0.4.15"
os_pipe = "0.9.2"
test_util = { path = "../test_util" }
tokio-tungstenite = "0.11.0"
tower-test = "0.3.0"

[target.'cfg(unix)'.dev-dependencies]
exec = "0.3.1" # Used in test_raw_tty
Expand Down
17 changes: 5 additions & 12 deletions cli/lsp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@ which is specifically tailored to provide a _Deno_ view of code. It is
integrated into the command line and can be started via the `lsp` sub-command.

> :warning: The Language Server is highly experimental and far from feature
> complete.

This document gives an overview of the structure of the language server.

## Acknowledgement

The structure of the language server was heavily influenced and adapted from
[`rust-analyzer`](https://rust-analyzer.github.io/).
> complete. This document gives an overview of the structure of the language
> server.

## Structure

When the language server is started, a `ServerState` instance is created which
holds all the state of the language server, as well as provides the
infrastructure for receiving and sending notifications and requests from a
language server client.
kitsonk marked this conversation as resolved.
Show resolved Hide resolved
When the language server is started, a `LanguageServer` instance is created
which holds all of the state of the language server. It also defines all of the
methods that the client calls via the Language Server RPC protocol.
Loading