**Problem:** Current relative line numbering creates a mismatch with vim-style navigation when soft wrap is enabled. Users must mentally calculate whether target lines are wrapped segments or logical lines, making `<n>j/k` navigation unreliable and cognitively demanding. **How things work today:** - Real line navigation (`j/k` moves by logical lines): Requires determining if visible lines are wrapped segments before jumping. Can't jump to wrapped lines directly. - Display line navigation (`j/k` moves by display rows): Line numbers don't correspond to actual row distances for multi-line jumps. **Proposed solution:** Count and number each display line (including wrapped segments) for relative numbering. This creates direct visual-to-navigational correspondence where the relative number shown always matches the `<n>j/k` distance needed. **Benefits:** - Eliminates mental overhead of distinguishing wrapped vs. logical lines - Makes relative line numbers consistently actionable regardless of wrap state - Preserves intuitive "what you see is what you navigate" principle - Maintains vim workflow efficiency in narrow window scenarios Also explained an discussed in https://github.com/zed-industries/zed/discussions/25733. Release Notes: Release Notes: - Added support for counting wrapped lines as relative lines and for displaying line numbers for wrapped segments. Changes `relative_line_numbers` from a boolean to an enum: `enabled`, `disabled`, or `wrapped`. --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
138 lines
2.4 KiB
Rust
138 lines
2.4 KiB
Rust
pub(crate) mod m_2025_01_02 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_01_29 {
|
|
mod keymap;
|
|
mod settings;
|
|
|
|
pub(crate) use keymap::KEYMAP_PATTERNS;
|
|
pub(crate) use settings::{SETTINGS_PATTERNS, replace_edit_prediction_provider_setting};
|
|
}
|
|
|
|
pub(crate) mod m_2025_01_30 {
|
|
mod keymap;
|
|
mod settings;
|
|
|
|
pub(crate) use keymap::KEYMAP_PATTERNS;
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_03_03 {
|
|
mod keymap;
|
|
|
|
pub(crate) use keymap::KEYMAP_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_03_06 {
|
|
mod keymap;
|
|
|
|
pub(crate) use keymap::KEYMAP_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_03_29 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_04_15 {
|
|
mod keymap;
|
|
mod settings;
|
|
|
|
pub(crate) use keymap::KEYMAP_PATTERNS;
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_04_21 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_04_23 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_05_05 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_05_08 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_05_29 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_06_16 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_06_25 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_06_27 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_07_08 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_10_01 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::flatten_code_actions_formatters;
|
|
}
|
|
|
|
pub(crate) mod m_2025_10_02 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::remove_formatters_on_save;
|
|
}
|
|
|
|
pub(crate) mod m_2025_10_03 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::SETTINGS_PATTERNS;
|
|
}
|
|
|
|
pub(crate) mod m_2025_10_16 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::restore_code_actions_on_format;
|
|
}
|
|
|
|
pub(crate) mod m_2025_10_17 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::make_file_finder_include_ignored_an_enum;
|
|
}
|
|
|
|
pub(crate) mod m_2025_10_21 {
|
|
mod settings;
|
|
|
|
pub(crate) use settings::make_relative_line_numbers_an_enum;
|
|
}
|