We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60d99d2 commit 645295aCopy full SHA for 645295a
1 file changed
src/renderer/components/editor/Editor.vue
@@ -129,6 +129,8 @@ async function init() {
129
lineWrapping: settings.wrap,
130
lineNumbers: true,
131
tabSize: settings.tabSize,
132
+ indentUnit: settings.tabSize,
133
+ indentWithTabs: true,
134
autoCloseBrackets: true,
135
matchBrackets: settings.matchBrackets,
136
styleActiveLine: settings.highlightLine,
@@ -252,6 +254,16 @@ async function init() {
252
254
},
253
255
)
256
257
+ watch(
258
+ () => settings.tabSize,
259
+ (tabSize) => {
260
+ const normalizedTabSize = Math.max(1, Number(tabSize) || 1)
261
+
262
+ editor?.setOption('tabSize', normalizedTabSize)
263
+ editor?.setOption('indentUnit', normalizedTabSize)
264
+ },
265
+ )
266
267
watch(searchQuery, () => {
268
nextTick(() => {
269
updateSearchOverlay()
0 commit comments