#[non_exhaustive]pub enum ConfigError {
UnsupportedFilePattern {
server: ServerId,
pattern: UnsupportedFilePattern,
},
NotUtf8(FromUtf8Error),
FileTooLarge(SizeExceeded),
DuplicateEnvKey {
server: ServerId,
error: DuplicateEnvKey,
},
NoParentDirectory {
path: PathBuf,
},
SelectionAutoOnNonTypescript {
language: LanguageId,
},
UnknownAllowedServer {
server: ServerId,
configured: Vec<ServerId>,
},
DuplicateServerId {
id: ServerId,
first: Box<EntrySummary>,
second: Box<EntrySummary>,
},
TwoCatchAllServers {
language: LanguageId,
existing: ServerId,
id: ServerId,
},
ToolClaimedTwice {
tool: ToolKind,
language: LanguageId,
existing: ServerId,
id: ServerId,
},
UnresolvableWorkspaceRoot {
written: PathBuf,
base_dir: PathBuf,
probe: PathBuf,
source: Error,
},
}Expand description
A configuration value that is invalid in the context of the entry that holds it.
Field-level rules live in the types of the fields (a rejected value cannot be built); this enum carries what only the surrounding entry or the whole configuration can add, such as which server a bad value belongs to.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsupportedFilePattern
A server entry lists a file_patterns form that maps to no extension.
Fields
pattern: UnsupportedFilePatternThe rejected pattern and the supported forms.
NotUtf8(FromUtf8Error)
The config file’s bytes are not UTF-8.
FileTooLarge(SizeExceeded)
The config file is over its fixed size limit, which is not configurable.
DuplicateEnvKey
A server’s env table sets one variable twice, which the host treats as
one name.
Fields
error: DuplicateEnvKeyThe colliding keys.
NoParentDirectory
A config path has no directory to resolve relative entries against.
SelectionAutoOnNonTypescript
selection = "auto" on an entry that is not typescript-language-server.
Fields
language: LanguageIdThe language of the offending entry.
UnknownAllowedServer
An allowed server id names no configured server.
Fields
DuplicateServerId
Two applicable entries share one server id.
TwoCatchAllServers
A language has two servers that both omit handles.
Fields
language: LanguageIdThe language both serve.
ToolClaimedTwice
Two servers of one language claim the same tool in handles.
Fields
language: LanguageIdThe language both serve.
UnresolvableWorkspaceRoot
A configured workspace root cannot be canonicalized.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()