pub struct MouseEnabled;Expand description
Whether the editor captures mouse events from the terminal.
With it on: the wheel scrolls the pane under the pointer, a
click positions the cursor, a drag selects in Visual mode, and
modeline elements that declare an on_click are clickable.
Default true as of MO.2, and the trade is worth stating.
Capture takes the mouse away from the terminal emulator, so the
emulator’s own click-drag selection and middle-click paste stop
working inside Lattice unless the terminal offers a Shift-drag
override (most do; not all). MO.1 defaulted this off because the
only thing capture bought was modeline clicks — a bad trade
against a capability every terminal user already has. Now that
the editor body answers the mouse, the trade goes the other way
for most users, and the ones it does not suit have one line of
config:
[ui]
mouse = false:set ui.mouse=false does the same thing for the session; the
TUI mirrors the option into the terminal’s reporting state
without a restart.
Terminal buffers get editor semantics like any other buffer.
Passthrough to a child pty is a separate mechanism and is not
built; until it is, a full-screen program inside :terminal
does not see the mouse.
Ignored by the GPUI peer, which owns its window’s input and therefore takes nothing away by listening for mouse events.
Implementations§
Source§impl MouseEnabled
impl MouseEnabled
Sourcepub fn build_spec() -> Option<bool>
pub fn build_spec() -> Option<bool>
Build the runtime spec for this declaration.
Used by the registry’s self-registration boot
path; not generally called by hand. Direct
construction of Option<T> is the macro’s
internal-only path – consumer code uses
config.get_typed::<#name_ident>() to read
and config.set_typed::<#name_ident>(...) to
write.
Trait Implementations§
Source§impl HasGroup for MouseEnabled
impl HasGroup for MouseEnabled
Source§const GROUP_NAME: &'static str = <crate::group::Mouse as ::lattice_config::OptionGroup>::NAME
const GROUP_NAME: &'static str = <crate::group::Mouse as ::lattice_config::OptionGroup>::NAME
"editor", "lsp", …). The macro
pulls this from the group = SomeGroup; directive at the
declaration block’s head.Source§impl OptionDecl for MouseEnabled
impl OptionDecl for MouseEnabled
Source§const NAME: &'static str = MouseEnabled
const NAME: &'static str = MouseEnabled
:set <NAME>=…,
TOML keys, completion candidates, :describe-option.
Internal access is type-driven. The macro derives this
from the option’s identifier (with namespace prefix when
declared via mode_options!); manually-typed NAMEs are
not supported for built-in options.Source§const DOC: &'static str = MouseEnabled
const DOC: &'static str = MouseEnabled
:describe-option, the :customize
form’s per-row help, and :apropos results.Source§const CUSTOMIZABLE: bool = true
const CUSTOMIZABLE: bool = true
true (the default) ⇒ option
appears in :set autocomplete + the :customize group
view. false ⇒ plugin / engine-internal state, hidden
from user surfaces. Equivalent of emacs’s defvar vs
defcustom. (See mode-architecture.md §6.5.3.)Source§fn default_value() -> Self::Value
fn default_value() -> Self::Value
const) so non-const-constructible types like String
can be defaults.