pub struct SemanticHistoryConfig {
pub semantic_history_enabled: bool,
pub semantic_history_editor_mode: SemanticHistoryEditorMode,
pub semantic_history_editor: String,
pub link_highlight_color: [u8; 3],
pub link_highlight_color_enabled: bool,
pub link_highlight_underline: bool,
pub link_underline_style: LinkUnderlineStyle,
pub link_handler_command: String,
pub allow_file_scheme_urls: bool,
}Expand description
File-path/URL detection, the editor that opens them, and link highlighting.
Fields§
§semantic_history_enabled: boolEnable semantic history (file path detection and opening) When enabled, Cmd/Ctrl+Click on detected file paths opens them in the editor.
semantic_history_editor_mode: SemanticHistoryEditorModeEditor selection mode for semantic history
custom- Use the editor command specified insemantic_history_editorenvironment_variable- Use$EDITORor$VISUALenvironment variable (default)system_default- Use system default application for each file type
semantic_history_editor: StringEditor command for semantic history (when mode is custom).
Placeholders: {file} = file path, {line} = line number (if available)
Examples:
code -g {file}:{line}(VS Code with line number)subl {file}:{line}(Sublime Text)vim +{line} {file}(Vim)emacs +{line} {file}(Emacs)
link_highlight_color: [u8; 3]Color for highlighted links (URLs and file paths) [R, G, B] (0-255)
link_highlight_color_enabled: boolApply color to highlighted links (URLs and file paths)
link_highlight_underline: boolUnderline highlighted links (URLs and file paths)
link_underline_style: LinkUnderlineStyleStyle for link highlight underlines (solid or stipple)
link_handler_command: StringCustom command to open URLs. When set, used instead of system default browser.
Use {url} as placeholder for the URL.
Examples:
firefox {url}(open in Firefox)open -a Safari {url}(macOS: open in Safari)chromium-browser {url}(Linux: open in Chromium)
When empty or unset, uses the system default browser.
allow_file_scheme_urls: boolAllow Cmd+Click (macOS) / Ctrl+Click to open file:// OSC 8 hyperlinks
and file URLs via the OS default handler (browser for .html, Finder for
directories, etc.).
Disabled by default for security (SEC-009): a remote program can emit an
OSC 8 hyperlink with a file:// scheme to make the OS handler open an
arbitrary local path. Enable only if you trust your terminal sessions.
Trait Implementations§
Source§impl Clone for SemanticHistoryConfig
impl Clone for SemanticHistoryConfig
Source§fn clone(&self) -> SemanticHistoryConfig
fn clone(&self) -> SemanticHistoryConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SemanticHistoryConfig
impl Debug for SemanticHistoryConfig
Source§impl Default for SemanticHistoryConfig
impl Default for SemanticHistoryConfig
Source§fn default() -> SemanticHistoryConfig
fn default() -> SemanticHistoryConfig
Source§impl<'de> Deserialize<'de> for SemanticHistoryConfig
impl<'de> Deserialize<'de> for SemanticHistoryConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SemanticHistoryConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SemanticHistoryConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for SemanticHistoryConfig
impl Serialize for SemanticHistoryConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for SemanticHistoryConfig
impl RefUnwindSafe for SemanticHistoryConfig
impl Send for SemanticHistoryConfig
impl Sync for SemanticHistoryConfig
impl Unpin for SemanticHistoryConfig
impl UnsafeUnpin for SemanticHistoryConfig
impl UnwindSafe for SemanticHistoryConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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>
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>
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().