pub(crate) struct Server {
pub(crate) db: Compiler,
pub(crate) diagnostics: Arc<Mutex<EditorDiagnostics>>,
}Fields§
§db: Compiler§diagnostics: Arc<Mutex<EditorDiagnostics>>Trait Implementations§
Source§impl Lsp for Server
impl Lsp for Server
Source§type Fork = ServerFork
type Fork = ServerFork
The server is “forked” to handle incoming “read” requests (e.g., goto-def).
“Read” requests are requests that do not modify document state.
fn new(_params: InitializeParams) -> Fallible<Self>
Source§fn server_capabilities(&mut self) -> Fallible<ServerCapabilities>
fn server_capabilities(&mut self) -> Fallible<ServerCapabilities>
Capabilities to report to the editor.
Source§fn server_info(&mut self) -> Fallible<Option<ServerInfo>>
fn server_info(&mut self) -> Fallible<Option<ServerInfo>>
Server info to report to the editor.
Source§fn fork(&mut self) -> Self::Fork
fn fork(&mut self) -> Self::Fork
Create a “fork” of the LSP server that can be used from another thread.
Source§fn did_open(
&mut self,
editor: &mut dyn Editor<Self>,
params: DidOpenTextDocumentParams,
) -> Fallible<()>
fn did_open( &mut self, editor: &mut dyn Editor<Self>, params: DidOpenTextDocumentParams, ) -> Fallible<()>
Open reported for the given URI.
Source§fn did_change(
&mut self,
editor: &mut dyn Editor<Self>,
params: DidChangeTextDocumentParams,
) -> Fallible<()>
fn did_change( &mut self, editor: &mut dyn Editor<Self>, params: DidChangeTextDocumentParams, ) -> Fallible<()>
Modification reported to the given URI.
Source§fn hover(
&mut self,
_editor: &mut dyn Editor<Self>,
params: HoverParams,
) -> Fallible<Option<Hover>>
fn hover( &mut self, _editor: &mut dyn Editor<Self>, params: HoverParams, ) -> Fallible<Option<Hover>>
Handle hover requests.
fn run() -> Fallible<()>
Auto Trait Implementations§
impl !Freeze for Server
impl !RefUnwindSafe for Server
impl Send for Server
impl !Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
impl !UnwindSafe for Server
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more