diff --git a/docs/changelog.md b/docs/changelog.md
index bbb6755..881de64 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -8,7 +8,7 @@ Here are the most notable changes in each release. For a more detailed list of c
- Added support for custom key bindings. See [the documentation](https://heynote.com/docs/#user-content-custom-key-bindings) for more info.
- Added a "command palette" that can be accessed by pressing `Ctrl/Cmd+Shift+P`, or just typing `>` in the buffer selector. The command palette allows you to discover all available commands in the app, and to quickly execute them.
-- Added support for configuring the tab size.
+- Added support for configuring the tab size, as well as the option to use tabs instead of spaces for indentation.
- Added functionality for moving blocks up and down. Default key bindings are `Ctrl/Cmd+Alt+Shift+Up` and `Ctrl/Cmd+Alt+Shift+Down`.
- Added functionality for inserting the current date and time. Default key binding is `Alt+Shift+D`.
diff --git a/electron/config.js b/electron/config.js
index 0db2c24..e50755f 100644
--- a/electron/config.js
+++ b/electron/config.js
@@ -48,6 +48,7 @@ const schema = {
"showInMenu": {type: "boolean", default: false},
"alwaysOnTop": {type: "boolean", default: false},
"bracketClosing": {type: "boolean", default: false},
+ "indentType": {type: "string", default: "space"},
"tabSize": {type: "integer", default: 4},
"defaultBlockLanguage": {type: "string"},
"defaultBlockLanguageAutoDetect": {type: "boolean"},
@@ -87,6 +88,7 @@ const defaults = {
showInMenu: false,
alwaysOnTop: false,
bracketClosing: false,
+ indentType: "space",
tabSize: 4,
},
theme: "system",
diff --git a/src/components/settings/Settings.vue b/src/components/settings/Settings.vue
index be95ab4..5a33249 100644
--- a/src/components/settings/Settings.vue
+++ b/src/components/settings/Settings.vue
@@ -45,6 +45,7 @@
showInMenu: this.initialSettings.showInMenu,
alwaysOnTop: this.initialSettings.alwaysOnTop,
bracketClosing: this.initialSettings.bracketClosing,
+ indentType: this.initialSettings.indentType || "space",
tabSize: this.initialSettings.tabSize || 4,
autoUpdate: this.initialSettings.autoUpdate,
bufferPath: this.initialSettings.bufferPath,
@@ -117,6 +118,7 @@
alwaysOnTop: this.alwaysOnTop,
autoUpdate: this.autoUpdate,
bracketClosing: this.bracketClosing,
+ indentType: this.indentType,
tabSize: this.tabSize,
bufferPath: this.bufferPath,
fontFamily: this.fontFamily === defaultFontFamily ? undefined : this.fontFamily,
@@ -293,6 +295,13 @@
>{{ size }} {{ size === 1 ? 'space' : 'spaces' }}
+