Introduce the tab_width setting and give tabs a greater value when counting indentation level.

This commit is contained in:
Tom Alexander
2023-09-15 21:52:42 -04:00
parent c9ce32c881
commit d443dbd468
5 changed files with 44 additions and 12 deletions

View File

@@ -2,6 +2,7 @@ use std::collections::BTreeSet;
use super::FileAccessInterface;
use super::LocalFileAccessInterface;
use crate::types::IndentationLevel;
use crate::types::Object;
// TODO: Ultimately, I think we'll need most of this: https://orgmode.org/manual/In_002dbuffer-Settings.html
@@ -16,6 +17,11 @@ pub struct GlobalSettings<'g, 's> {
///
/// Corresponds to the org-list-allow-alphabetical elisp variable.
pub org_list_allow_alphabetical: bool,
/// How many spaces a tab should be equal to.
///
/// Corresponds to the tab-width elisp variable.
pub tab_width: IndentationLevel,
}
impl<'g, 's> GlobalSettings<'g, 's> {
@@ -28,6 +34,7 @@ impl<'g, 's> GlobalSettings<'g, 's> {
in_progress_todo_keywords: BTreeSet::new(),
complete_todo_keywords: BTreeSet::new(),
org_list_allow_alphabetical: false,
tab_width: 8,
}
}
}