mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-24 18:36:18 +04:00
Merge ac8ebe739d
into dc941d6d24
This commit is contained in:
commit
53d893640b
@ -32,6 +32,7 @@ ### `[editor]` Section
|
||||
| `cursorline` | Highlight all lines with a cursor | `false` |
|
||||
| `cursorcolumn` | Highlight all columns with a cursor | `false` |
|
||||
| `gutters` | Gutters to display: Available are `diagnostics` and `diff` and `line-numbers` and `spacer`, note that `diagnostics` also includes other features like breakpoints, 1-width padding will be inserted if gutters is non-empty | `["diagnostics", "spacer", "line-numbers", "spacer", "diff"]` |
|
||||
| `command-git-ignore` | Whether to read `.gitignore` when listing paths in the command prompt | `true` |
|
||||
| `auto-completion` | Enable automatic pop up of auto-completion | `true` |
|
||||
| `path-completion` | Enable filepath completion. Show files and directories if an existing path at the cursor was recognized, either absolute or relative to the current opened document or current working directory (if the buffer is not yet saved). Defaults to true. | `true` |
|
||||
| `auto-format` | Enable automatic formatting on save | `true` |
|
||||
|
@ -341,7 +341,7 @@ pub fn setting(_editor: &Editor, input: &str) -> Vec<Completion> {
|
||||
}
|
||||
|
||||
pub fn filename(editor: &Editor, input: &str) -> Vec<Completion> {
|
||||
filename_with_git_ignore(editor, input, true)
|
||||
filename_with_git_ignore(editor, input, editor.config().command_git_ignore)
|
||||
}
|
||||
|
||||
pub fn filename_with_git_ignore(
|
||||
@ -392,7 +392,7 @@ pub fn lsp_workspace_command(editor: &Editor, input: &str) -> Vec<Completion> {
|
||||
}
|
||||
|
||||
pub fn directory(editor: &Editor, input: &str) -> Vec<Completion> {
|
||||
directory_with_git_ignore(editor, input, true)
|
||||
directory_with_git_ignore(editor, input, editor.config().command_git_ignore)
|
||||
}
|
||||
|
||||
pub fn directory_with_git_ignore(
|
||||
@ -472,6 +472,8 @@ fn filename_impl<F>(
|
||||
.hidden(false)
|
||||
.follow_links(false) // We're scanning over depth 1
|
||||
.git_ignore(git_ignore)
|
||||
.git_global(git_ignore)
|
||||
.git_exclude(git_ignore)
|
||||
.max_depth(Some(1))
|
||||
.build()
|
||||
.filter_map(|file| {
|
||||
|
@ -260,6 +260,8 @@ pub struct Config {
|
||||
pub cursorcolumn: bool,
|
||||
#[serde(deserialize_with = "deserialize_gutter_seq_or_struct")]
|
||||
pub gutters: GutterConfig,
|
||||
/// Whether .gitignore should be read when listing paths in the command prompt. Defaults to true.
|
||||
pub command_git_ignore: bool,
|
||||
/// Middle click paste support. Defaults to true.
|
||||
pub middle_click_paste: bool,
|
||||
/// Automatic insertion of pairs to parentheses, brackets,
|
||||
@ -954,6 +956,7 @@ fn default() -> Self {
|
||||
cursorline: false,
|
||||
cursorcolumn: false,
|
||||
gutters: GutterConfig::default(),
|
||||
command_git_ignore: true,
|
||||
middle_click_paste: true,
|
||||
auto_pairs: AutoPairConfig::default(),
|
||||
auto_completion: true,
|
||||
|
Loading…
Reference in New Issue
Block a user