git_ui: Add Git Panel settings (#23132)
This PR adds settings for the Git Panel.
The new settings include:
| Setting | Description | Default |
|---------|-------------|---------|
| `git_panel.button` | Toggle visibility of the Git Panel button in the
status bar | `true` |
| `git_panel.dock` | Choose where to dock the Git Panel | `"left"` |
| `git_panel.default_width` | Set the default width of the Git Panel in
pixels | `360` |
| `git_panel.status_style` | Select how Git status is displayed |
`"icon"` |
| `git_panel.scrollbar.show` | Configure scrollbar behavior | Inherits
from editor settings |
Example usage:
```json
"git_panel": {
"button": true,
"dock": "left",
"default_width": 360,
"status_style": "icon",
"scrollbar": {
"show": "auto"
}
}
```
Release Notes:
- N/A
This commit is contained in:
@@ -2,9 +2,9 @@ use ::settings::Settings;
|
||||
use collections::HashMap;
|
||||
use futures::{future::FusedFuture, select, FutureExt};
|
||||
use git::repository::{GitFileStatus, GitRepository, RepoPath};
|
||||
use git_panel_settings::GitPanelSettings;
|
||||
use gpui::{actions, AppContext, Context, Global, Hsla, Model, ModelContext};
|
||||
use project::{Project, WorktreeId};
|
||||
use settings::GitPanelSettings;
|
||||
use std::sync::mpsc;
|
||||
use std::{
|
||||
pin::{pin, Pin},
|
||||
@@ -16,7 +16,7 @@ use ui::{Color, Icon, IconName, IntoElement, SharedString};
|
||||
use worktree::RepositoryEntry;
|
||||
|
||||
pub mod git_panel;
|
||||
mod settings;
|
||||
mod git_panel_settings;
|
||||
|
||||
const GIT_TASK_DEBOUNCE: Duration = Duration::from_millis(50);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user