You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by harry-xm August 28, 2024 // is not grayed out in the following parts of a textDocument/hover result, but is grayed out in the editor.
// Make a server from the previous examples...let server = Server::bind(&([127,0,0,1],3000).into()).serve(make_service);
...
LSP server's response is
[Trace - 20:07:31] Received response 'textDocument/hover - (89)' in 1ms.
Result: {
"contents": {
"kind": "markdown",
"value": "\n```rust\nhyper::server::server::Server\n```\n\n```rust\n// Implements notable traits: Future\u003cOutput \u003d ?\u003e\npub fn with_graceful_shutdown\u003cF\u003e(self, signal: F) -\u003e Graceful\u003cI, S, F, E\u003e\nwhere\n F: Future\u003cOutput \u003d ()\u003e,\n E: NewSvcExec\u003cIO, S::Future, S::Service, E, GracefulWatcher\u003e,\n```\n\n---\n\nPrepares a server to handle graceful shutdown when the provided future\ncompletes.\n\n# Example\n\n```rust\n// Make a server from the previous examples...\nlet server \u003d Server::bind(\u0026([127, 0, 0, 1], 3000).into())\n .serve(make_service);\n\n// Prepare some signal for when the server should start shutting down...\nlet (tx, rx) \u003d tokio::sync::oneshot::channel::\u003c()\u003e();\nlet graceful \u003d server\n .with_graceful_shutdown(async {\n rx.await.ok();\n });\n\n// Await the `server` receiving the signal...\nif let Err(e) \u003d graceful.await {\n eprintln!(\"server error: {}\", e);\n}\n\n// And later, trigger the signal by calling `tx.send(())`.\nlet _ \u003d tx.send(());\n```"
},
"range": {
"start": {
"line": 96,
"character": 9
},
"end": {
"line": 96,
"character": 31
}
}
}
```</div>
The text was updated successfully, but these errors were encountered:
Discussed in #492
Originally posted by harry-xm August 28, 2024
//
is not grayed out in the following parts of atextDocument/hover
result, but is grayed out in the editor.LSP server's response is
The text was updated successfully, but these errors were encountered: