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.
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 root_ratoml_path(&self) -> &VfsPath
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 linked_or_discovered_projects(&self) -> Vec<LinkedProject>
pub fn did_save_text_document_dynamic_registration(&self) -> bool
pub fn did_change_watched_files_dynamic_registration(&self) -> bool
pub fn did_change_watched_files_relative_pattern_support(&self) -> bool
pub fn prefill_caches(&self) -> bool
pub fn location_link(&self) -> bool
pub fn line_folding_only(&self) -> bool
pub fn hierarchical_symbols(&self) -> bool
pub fn code_action_literals(&self) -> bool
pub fn work_done_progress(&self) -> bool
pub fn will_rename(&self) -> bool
pub fn change_annotation_support(&self) -> bool
pub fn code_action_resolve(&self) -> bool
pub fn signature_help_label_offsets(&self) -> bool
pub fn completion_label_details_support(&self) -> bool
pub fn semantics_tokens_augments_syntax_tokens(&self) -> bool
pub fn position_encoding(&self) -> PositionEncoding
pub fn code_action_group(&self) -> bool
pub fn local_docs(&self) -> bool
pub fn open_server_logs(&self) -> bool
pub fn server_status_notification(&self) -> bool
sourcepub fn color_diagnostic_output(&self) -> bool
pub fn color_diagnostic_output(&self) -> bool
Whether the client supports colored output for full diagnostics from checkOnSave
.
pub fn test_explorer(&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<usize>
pub fn lru_query_capacities_config(&self) -> Option<&FxHashMap<Box<str>, usize>>
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) -> RustfmtConfig
pub fn flycheck_workspace(&self) -> bool
pub fn cargo_test_options(&self) -> CargoOptions
pub fn flycheck(&self) -> FlycheckConfig
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 semantic_tokens_refresh(&self) -> bool
pub fn code_lens_refresh(&self) -> bool
pub fn inlay_hints_refresh(&self) -> bool
pub fn insert_replace_support(&self) -> bool
pub fn client_commands(&self) -> ClientCommandsConfig
pub fn prime_caches_num_threads(&self) -> u8
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> 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