pub struct ServerDef {
pub kind: ServerKind,
pub name: String,
pub extensions: Vec<String>,
pub binary: String,
pub args: Vec<String>,
pub root_markers: Vec<String>,
pub env: HashMap<String, String>,
pub initialization_options: Option<Value>,
}Expand description
Definition of a language server.
Fields§
§kind: ServerKind§name: StringDisplay name.
extensions: Vec<String>File extensions this server handles.
binary: StringBinary name to look up on PATH.
args: Vec<String>Arguments to pass when spawning.
root_markers: Vec<String>Root marker files — presence indicates a workspace root.
env: HashMap<String, String>Extra environment variables for this server process.
initialization_options: Option<Value>Optional JSON initializationOptions for the initialize request.
Implementations§
Source§impl ServerDef
impl ServerDef
Sourcepub fn matches_extension(&self, ext: &str) -> bool
pub fn matches_extension(&self, ext: &str) -> bool
Check if this server handles a given file extension.
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Check if the server binary is available on PATH.
Trait Implementations§
impl Eq for ServerDef
impl StructuralPartialEq for ServerDef
Auto Trait Implementations§
impl Freeze for ServerDef
impl RefUnwindSafe for ServerDef
impl Send for ServerDef
impl Sync for ServerDef
impl Unpin for ServerDef
impl UnsafeUnpin for ServerDef
impl UnwindSafe for ServerDef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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