All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
0.20.0 - 2023-08-10
- Add support for pull-based diagnostics from LSP 3.17.0 (PR #396).
- Implement
textDocument/diagnostic
server request. - Implement
workspace/diagnostic
server request. - Implement
workspace/diagnostic/refresh
client request.
- Implement
- Implement
std::str::FromStr
forjsonrpc::{Request,Response}
(PR #379). - Implement
From<jsonrpc::ErrorCode>
fori64
(PR #379). - Document supported LSP features in FEATURES.md matrix (PR #383).
- Bump minimum supported Rust version from
1.52.0
to1.64.0
(PR #377, PR #395). - Update
lsp-types
from0.94
to0.94.1
(PR #396). - Update
syn
from1
to2
(PR #390). - Update dev-dependency
async-tungstenite
from0.18
to0.22
(PR #395). - Update dev-dependency
ws_stream_tungstenite
from0.9
to0.10
(PR #395). - Optimize JSON-RPC deserialization types.
- Change
jsonrpc::Error::message
field toCow<'static, str>
(PR #378). - Mark several methods on
jsonrpc::Error
asconst fn
(PR #378). - Mark all methods on
jsonrpc::ErrorCode
asconst fn
(PR #378). - Avoid heap allocation in
version
field deserialization (PR #379).
- Change
- Fix broken Markdown in doc comment for
LanguageServer::completion()
(PR #396).
0.19.0 - 2023-02-28
- Add
LspService::inner()
method (PR #344). - Add missing
window/showDocument
client request from LSP 3.16.0 (PR #375). - Add partial support for Language Server Protocol 3.17.0 (PR #375):
- Implement
textDocument/prepareTypeHierarchy
server request. - Implement
typeHierarchy/supertypes
server request. - Implement
typeHierarchy/subtypes
server request. - Implement
textDocument/inlineValue
server request. - Implement
textDocument/inlayHint
server request. - Implement
inlayHint/resolve
server request. - Implement
workspaceSymbol/resolve
server request. - Implement
workspace/inlineValue/refresh
client request. - Implement
workspace/inlayHint/refresh
client request.
- Implement
- Address Clippy lints (PR #369).
- Update
edition
from2018
to2021
(PR #370). - Update
lsp-types
from0.93
to0.94
(PR #367). - Reorder
LanguageServer
trait methods to match the LSP 3.17.0 spec document (PR #375). - Reorder
Client
inherent methods to better match the LSP 3.17.0 spec document (PR #375).
- Fix doc links for
textDocument/colorPresentation
request (PR #371). - Fix doc links for
textDocument/willSaveWaitUntil
request (PR #371). - Fix doc links for
workspace/didChangeWatchedFiles
request (PR #371). - Improve documentation for
LanguageServer
andClient
methods (PR #375).
0.18.0 - 2023-01-14
- Switch from
log
facade totracing
(PR #332). - Change
$/cancelRequest
log message fromwarn
todebug
(PR #353). - Update
auto_impl
from0.5
to1.0
(PR #343). - Update
httparse
from1.3.5
to1.8
(PR #363) - Update
memchr
from2.4.1
to2.5
(PR #363). - Relax
tower
version requirement from0.3.11
to0.3
(PR #363). - Update dev-dependency
async-tungstenite
from0.16
to0.18
(PR #363). - Update dev-dependency
ws_stream_tungstenite
from0.7
to0.9
(PR #363).
- Improve client connection behavior in
tcp
example (PR #336). - Tweak grammar in
initialized
andtextDocument/codeAction
doc comments (PR #361).
0.17.0 - 2022-04-15
- Support proposed LSP features with the
proposed
feature flag (PR #330).
- Update
lsp-types
from0.92
to0.93
(PR #333).
0.16.0 - 2022-03-10
- Support defining custom JSON-RPC requests on
LspService
(PR #313). - Add compatibility with WASM (PR #309).
- Support alternative async runtimes other than
tokio
when enabling theruntime-agnostic
feature (PR #309). - Implement
Service<Request, Response = Option<Response>>
forClient
(PR #313). - Expose
concurrency_level
setting onServer
, allowing adjustment from the default value of 4. - Add
Request::build()
interface for creating custom requests. - Add convenient
From
implementations forjsonrpc::Id
. - Add
.result()
/.error()
and.is_ok()
/.is_error()
methods tojsonrpc::Response
.
LspService
now implementsService<Request, Response = Option<Response>>
.LspService::new()
now returns aClientSocket
instead of aMessageStream
.Server::new()
now requires a thirdClientSocket
argument instead of using.interleave()
.- Rename
Client::send_custom_{request,notification}
toClient::send_{request,notification}
. - Rename
jsonrpc::Response::{ok, error}
tojsonrpc::Response::{from_ok, from_error}
.
- Close
Client
channel properly onexit
notification (PR #309). - Fix
Server
occasionally stalling by processing client responses separately from client-to-server requests (PR #313). - Return error code
-32600
(invalid request) if incoming data is valid JSON, but isn't a JSON-RPC request or response (PR #313).
- Remove
.interleave()
method fromServer
(PR #313). - Remove
jsonrpc::{ClientRequest, Incoming, Outgoing, ServerRequest}
(PR #313). - Remove
MessageStream
(PR #313).
0.15.1 - 2022-02-14
- Fix semver incompatibility in release of
tower-lsp-macros
(PR #306).- Re-released
tower-lsp-macros
0.4.2 -> 0.5.0. - Re-released
tower-lsp
0.15.0 -> 0.15.1.
- Re-released
- Update
tokio-util
from0.6.5
to0.7.0
(PR #303).
0.15.0 - 2022-02-10 [YANKED]
- Bump minimum supported Rust version from
1.45.0
to1.52.0
(PR #300). - Update
lsp-types
from0.89
to0.92
(PR #300). - Update
auto_impl
from0.4
to0.5
(PR #298). - Update
dashmap
from4.0.2
to5.0.0
(PR #298). - Update
nom
from6.1.2
to7.1.0
(PR #298).
- Support
null
and negative integer values as request IDs (PR #285).
0.14.1 - 2021-05-21
- Fix regression in server-side
$/cancelRequest
support (PR #280).
0.14.0 - 2021-05-20
- Add support for Language Server Protocol 3.16.0 (PR #270):
- Implement
workspace/willCreateFiles
server request. - Implement
workspace/willRenameFiles
server request. - Implement
workspace/willDeleteFiles
server request. - Implement
workspace/didCreateFiles
server notification. - Implement
workspace/didRenameFiles
server notification. - Implement
workspace/didDeleteFiles
server notification. - Implement call hierarchy server requests.
- Implement semantic tokens server requests.
- Implement
workspace/codeLens/refresh
client request. - Implement
workspace/semanticTokens/refresh
client request. - Implement
textDocument/linkedEditingRange
server request. - Implement
textDocument/moniker
request. - Implement
codeAction/resolve
request.
- Implement
- Add support for custom server-to-client requests (PR #275).
- Bump minimum supported Rust version from
1.41.0
to1.45.0
(PR #264). - Update
lsp-types
from0.82
to0.89
(PR #264). - Update
tokio
from0.2
to1.6
(PR #264, PR #268). - Update
tokio-util
from0.3
to0.6.5
(PR #264). - Update
bytes
from0.5
to1.0.1
(PR #264). - Update
dashmap
from3.5.1
to4.0.2
(PR #264). - Update
nom
from5.1
to6.1.2
(PR #264). - Eliminate looping, message reparsing in codec using SIMD accelerated
take_until
combinator (PR #274).
- Fix race when sending requests to the client (PR #245).
- Permit
window/showMessageRequest
while server is uninitialized (PR #288). - Fix client request futures hanging by fixing
serde
overlap (PR #269). - Correctly handle incoming zero-length messages (PR #271).
- Clean up documentation, fix broken intra-doc and external doc links.
0.13.3 - 2020-09-19
- Increase
lsp-types
semantic version range to>=0.79, <0.82
. This is safe because the upstream changes only concern proposed LSP features, which this library does not currently support.
0.13.2 - 2020-09-03
- Increase
lsp-types
semantic version range to>=0.79, <0.81
. This is safe because the upstream changes only concern proposed LSP features, which this library does not currently support.
0.13.1 - 2020-08-21
- Improve
std::fmt::Debug
implementation forClient
(PR #216). - Several API documentation improvements.
- Fix infinite loop upon encountering invalid UTF-8 characters in an incoming message (PR #215).
0.13.0 - 2020-08-20
- Improve log message quality and reduce noise.
- Return responses in corresponding request order to make things easier on the client side (PR #212).
- Change remaining
Client
notification methods toasync fn
(PR #213). - Bump minimum supported Rust version to 1.41.0 (PR #213).
- Report missing params as "invalid params" instead of "parse error" (PR #211).
0.12.1 - 2020-08-11
- Reject multiple
initialize
requests sent in quick succession (PR #208). - Fix bug deserializing
jsonrpc
field fromserde_json::Value
(PR #209).
0.12.0 - 2020-08-09
- Add private subcrate
tower-lsp-macros
for internal use only (PR #202). - Implement cancellation support via
$/cancelRequest
(PR #202). - Officially support serving over TCP (PR #198).
- Update
lsp-types
crate from 0.74 to 0.79. - Have language servers store
Client
directly as struct field (PR #199). - Replace
jsonrpc-core
with minimal JSON-RPC implementation (PR #202). - Redefine
LspService
asService<Incoming, Response = Option<Outgoing>>
. - Implement
FusedStream
forMessageStream
.
- Fix typo which caused
workspace/didChangeConfiguration
to break (PR #195). - Implement proper parse error recovery in LSP codec (PR #201).
- Refuse to accept further requests after
shutdown
has been called once.
- Remove dependency on
jsonrpc-core
, astower-lsp
no longer relies on it. - Remove
LspService::with_handler()
constructor (PR #202).
0.11.0 - 2020-04-30
- Update
lsp-types
crate from 0.73 to 0.74 (PR #178). This introduces breaking changes to the followingLanguageServer
trait method signatures:hover()
signatureHelp()
goto_declaration()
goto_definition()
goto_type_definition()
goto_implementation()
document_highlight()
- Make
LanguageServer::initialize()
handlerasync fn
(PR #182). - Accept
stdin
andstdout
handles that are notSend + 'static
. This permits the use ofstd::io::Cursor
orVec<u8>
as mock stdio sources for tests, and passing in&mut
handles is now supported as well (PR #184).
- Fix broken bidirectional request/response routing (PR #184). The original implementation introduced in 0.9.0 would deadlock under certain conditions.
0.10.1 - 2020-04-29
- Implement
Clone
forClient
so it can be safely passed to functions expecting'static
values. - Mark
MessageStream
as#[must_use]
.
0.10.0 - 2020-03-19
- Implement support for the following client-to-server messages:
textDocument/willSaveWaitUntil
textDocument/selectionRange
- Re-export useful
jsonrpc-core
types in a newjsonrpc
module (PR #169).
- Update
lsp-types
crate from 0.70 to 0.73 (PR #162).
- Fix JSON-RPC delegate for
textDocument/foldingRange
(PR #167).
0.9.1 - 2020-03-07
- Implement support for the following client-to-server messages:
textDocument/documentColor
textDocument/colorPresentation
textDocument/rangeFormatting
textDocument/onTypeFormatting
textDocument/foldingRange
- Server will accept the
initialize
request from the client only once and will respond with JSON-RPC error code-32600
if sent again (PR #160).
- Fix broken links and improve documentation (PRs #152 #157 #158).
0.9.0 - 2020-03-04
- Add
info!()
message when server initializes to be consistent with the existinginfo!()
message that is emitted when the server exits. - Implement support for the following client-to-server messages:
textDocument/references
textDocument/documentLink
documentLink/resolve
textDocument/rename
textDocument/prepareRename
- Implement support for the following server-to-client messages:
window/showMessageRequest
workspace/workspaceFolders
workspace/configuration
- Improve LSP message encoding efficiency (PR #126).
- Reduce chattiness of
trace!()
logs (PR #130). - Change all notification trait methods to
async fn
(PR #131). - Implement proper server-to-client request routing (PRs #134 #135).
- Rename
Printer
toClient
. - Change
Client::apply_edit()
to returnResult<ApplyWorkspaceEditResponse>
. - Change
Client::register_capability()
to returnResult<()>
. - Change
Client::unregister_capability()
to returnResult<()>
.
- Remove redundant serialization steps from
Client
(PR #129).
0.8.0 - 2020-02-28
- Implement support for the following client-to-server messages:
textDocument/willSave
completionItem/resolve
textDocument/documentSymbol
textDocument/codeAction
textDocument/codeLens
codeLens/resolve
textDocument/formatting
LspService::call()
stops serving requests afterexit
notification, meaning there is no longer a need forExitReceiver::run_until_exit
and theServer::serve()
async method can now be awaited directly (PR #117).- Return
Option<String>
as service response type (PR #116). - Disable unused
nom
features for a hopefully lighter build (PR #112). - Link to current version of LSP specification in doc comments (PR #122).
- Correctly handle backpressure using
Service::poll_ready()
(PR #117).
- Remove
ExitReceiver
type andLspService::close_handle()
method (PR #117).
0.7.0 - 2020-02-24
- Add default implementations to all non-required
LanguageServer
methods. - Add support for emitting custom notifications to clients (PR #99).
- Implement support for the following client-to-server messages:
textDocument/signatureHelp
textDocument/implementation
- Bump minimum supported Rust version to 1.39.0.
- Convert to
std::future
and async/await (PR #101). - Update
futures
crate from 0.1.28 to 0.3. - Update
lsp-types
crate from 0.68.0 to 0.70. - Update
tokio
crate from 0.1.12 to 0.2. - Update
tower-service
crate from 0.2.0 to 0.3.
- Fix some incorrect links in doc comments.
0.6.0 - 2020-01-07
- Implement support for the following client-to-server messages:
textDocument/declaration
textDocument/definition
textDocument/typeDefinition
- Update
lsp-types
crate from 0.63.1 to 0.68.0.
0.5.0 - 2019-12-12
- Add support for Language Server Protocol 3.15.
- Update
lsp-types
crate from 0.61.0 to 0.63.1.
0.4.1 - 2019-12-09
- Update
jsonrpc-core
crate from 14.0 to 14.0.5. - Update
jsonrpc-derive
crate from 14.0 to 14.0.5. - Update
log
crate from 0.4.7 to 0.4.8. - Update
serde
crate from 1.0.99 to 1.0.103. - Update
tokio-executor
crate from 0.1.8 to 0.1.9. - Update
env_logger
crate from 0.7.0 to 0.7.1.
- Correctly handle LSP requests containing incomplete UTF-8 (PR #66).
0.4.0 - 2019-10-02
- Implement support for
textDocument/completion
request.
- Expose
Printer
inLanguageServer::initialize()
. - Update
env_logger
crate from 0.6.2 to 0.7.0. - Update
lsp-types
crate from 0.60.0 to 0.61.0.
- Allow
window/logMessage
,window/showMessage
, andtelemetry/event
server-to-client notifications ininitialize
request (PR #48). - Update links to the LSP specification website to point to the new URL.
0.3.1 - 2019-09-08
- Use more descriptive message in not initialized JSON-RPC error.
- Initialize example server with available features so it can be used as a working mock language server.
- Allow JSON data for
telemetry/event
notification to be null.
0.3.0 - 2019-09-05
- Add support for decoding the optional
Content-Type
field in messages. - Implement support for the following client-to-server messages:
workspace/didChangeWorkspaceFolders
workspace/didChangeConfiguration
workspace/didChangeWatchedFiles
workspace/symbol
workspace/executeCommand
- Implement support for the following server-to-client messages:
telemetry/event
client/registerCapability
client/unregisterCapability
workspace/applyEdit
- Bump minimum Rust version to 1.34.0.
- Rename
highlight()
todocument_highlight()
to better match the specification. - Make all notification methods into provided methods (PR #34).
- Change
LspService
request type fromString
toIncoming
(PR #28). - Update
Server
to spawn services withIncoming
request type. - Use
env_logger
to print log messages in examples.
- Fix broken doc link to
textDocument/didChange
inLanguageServer
trait.
0.2.0 - 2019-09-03
- Add
ExitedError
for when callingLspService
after it has already exited.
- Language server now returns server error code
-32002
if any method is called beforeinitialize
request is received, as per the spec. LspService
setsService::Error
toExitedError
.Server
can now accept any service whereService::Error
is convertible toBox<dyn Error + Send + Sync>
. This enables compatibility with most Tower middleware.- Retain error or success from future in
ExitReceiver::run_until_exit()
. - Remove
'static
bounds on someServer
andExitReceiver
methods.
0.1.0 - 2019-09-02
- Initial crate release.
- Implement support for the following message types:
initialize
initialized
shutdown
exit
window/showMessage
window/logMessage
textDocument/publishDiagnostics
textDocument/didOpen
textDocument/didChange
textDocument/didSave
textDocument/didClose
textDocument/hover
textDocument/documentHighlight