Struct ra_ap_rust_analyzer::config::Config
source · pub struct Config { /* private fields */ }Implementations§
source§impl Config
impl Config
pub fn user_config_path(&self) -> &VfsPath
pub fn same_source_root_parent_map( &self, other: &Arc<FxHashMap<SourceRootId, SourceRootId>>, ) -> bool
sourcepub fn apply_change(&self, change: ConfigChange) -> (Config, ConfigErrors, bool)
pub fn apply_change(&self, change: ConfigChange) -> (Config, ConfigErrors, bool)
Given change this generates a new Config, thereby collecting errors of type ConfigError.
If there are changes that have global/client level effect, the last component of the return type
will be set to true, which should be used by the GlobalState to update itself.
pub fn add_linked_projects( &mut self, data: ProjectJsonData, buildfile: AbsPathBuf, )
source§impl Config
impl Config
pub fn new( root_path: AbsPathBuf, caps: ClientCapabilities, workspace_roots: Vec<AbsPathBuf>, visual_studio_code_version: Option<Version>, user_config_path: Option<Utf8PathBuf>, ) -> Self
pub fn rediscover_workspaces(&mut self)
pub fn remove_workspace(&mut self, path: &AbsPath)
pub fn add_workspaces(&mut self, paths: impl Iterator<Item = AbsPathBuf>)
pub fn json_schema() -> Value
pub fn root_path(&self) -> &AbsPathBuf
pub fn caps(&self) -> &ClientCapabilities
source§impl Config
impl Config
pub fn assist(&self, source_root: Option<SourceRootId>) -> AssistConfig
pub fn completion(&self, source_root: Option<SourceRootId>) -> CompletionConfig
pub fn detached_files(&self) -> &Vec<AbsPathBuf>
pub fn diagnostics( &self, source_root: Option<SourceRootId>, ) -> DiagnosticsConfig
pub fn expand_proc_attr_macros(&self) -> bool
pub fn hover_actions(&self) -> HoverActionsConfig
pub fn hover(&self) -> HoverConfig
pub fn inlay_hints(&self) -> InlayHintsConfig
pub fn join_lines(&self) -> JoinLinesConfig
pub fn highlighting_non_standard_tokens(&self) -> bool
pub fn highlighting_config(&self) -> HighlightConfig
pub fn has_linked_projects(&self) -> bool
pub fn linked_manifests(&self) -> impl Iterator<Item = &Utf8Path> + '_
pub fn has_linked_project_jsons(&self) -> bool
pub fn discover_workspace_config(&self) -> Option<&DiscoverWorkspaceConfig>
pub fn linked_or_discovered_projects(&self) -> Vec<LinkedProject>
pub fn prefill_caches(&self) -> bool
pub fn publish_diagnostics(&self) -> bool
pub fn diagnostics_map(&self) -> DiagnosticsMapConfig
pub fn extra_args(&self) -> &Vec<String>
pub fn extra_env(&self) -> &FxHashMap<String, String>
pub fn check_extra_args(&self) -> Vec<String>
pub fn check_extra_env(&self) -> FxHashMap<String, String>
pub fn lru_parse_query_capacity(&self) -> Option<u16>
pub fn lru_query_capacities_config(&self) -> Option<&FxHashMap<Box<str>, u16>>
pub fn proc_macro_srv(&self) -> Option<AbsPathBuf>
pub fn ignored_proc_macros(&self) -> &FxHashMap<Box<str>, Box<[Box<str>]>>
pub fn expand_proc_macros(&self) -> bool
pub fn files(&self) -> FilesConfig
pub fn notifications(&self) -> NotificationsConfig
pub fn cargo_autoreload_config(&self) -> bool
pub fn run_build_scripts(&self) -> bool
pub fn cargo(&self) -> CargoConfig
pub fn rustfmt(&self, source_root_id: Option<SourceRootId>) -> RustfmtConfig
pub fn flycheck_workspace(&self) -> bool
pub fn check_on_save(&self) -> bool
pub fn script_rebuild_on_save(&self) -> bool
pub fn runnables(&self) -> RunnablesConfig
pub fn find_all_refs_exclude_imports(&self) -> bool
pub fn find_all_refs_exclude_tests(&self) -> bool
pub fn snippet_cap(&self) -> Option<SnippetCap>
pub fn call_info(&self) -> CallInfoConfig
pub fn lens(&self) -> LensConfig
pub fn workspace_symbol(&self) -> WorkspaceSymbolConfig
pub fn client_commands(&self) -> ClientCommandsConfig
pub fn prime_caches_num_threads(&self) -> usize
pub fn main_loop_num_threads(&self) -> usize
pub fn typing_autoclose_angle(&self) -> bool
pub fn visual_studio_code_version(&self) -> Option<&Version>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
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> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U using CastTo.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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