Line numbers short mode (#10354)

Followup to #10327 
It can be enabled with the following setting:

"line_indicator_format": "short"

No release note, as the original change didn't go out to Preview yet.

/cc @bartekpacia @0x2CA

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-04-10 12:08:07 +02:00 committed by GitHub
parent 4151ba13a1
commit 39e0e26d1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 71 additions and 6 deletions

View file

@ -1,10 +1,12 @@
pub mod cursor_position;
use cursor_position::LineIndicatorFormat;
use editor::{scroll::Autoscroll, Editor};
use gpui::{
actions, div, prelude::*, AnyWindowHandle, AppContext, DismissEvent, EventEmitter, FocusHandle,
FocusableView, Render, SharedString, Styled, Subscription, View, ViewContext, VisualContext,
};
use settings::Settings;
use text::{Bias, Point};
use theme::ActiveTheme;
use ui::{h_flex, prelude::*, v_flex, Label};
@ -14,6 +16,7 @@ use workspace::ModalView;
actions!(go_to_line, [Toggle]);
pub fn init(cx: &mut AppContext) {
LineIndicatorFormat::register(cx);
cx.observe_new_views(GoToLine::register).detach();
}