mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
2828690fc7
The LSP code had numerous places where competing threads could take out out locks in different orders, making it very prone to deadlocks. This commit sidesteps the entire issue by switching to a single lock. The above is a little white lie: the Sources struct still uses a mutex internally to avoid having to boil the ocean (because being honest about what it does involves changing all its methods to `&mut self` but that ripples out extensively...) I'll save that one for another day. |
||
---|---|---|
.. | ||
analysis.rs | ||
capabilities.rs | ||
config.rs | ||
diagnostics.rs | ||
documents.rs | ||
language_server.rs | ||
mod.rs | ||
README.md | ||
sources.rs | ||
text.rs | ||
tsc.rs | ||
utils.rs |
Deno Language Server
The Deno Language Server provides a server implementation of the
Language Server Protocol
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.
⚠️ The Language Server is highly experimental and far from feature complete. This document gives an overview of the structure of the language server.
Structure
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.