Repository navigation
Description
Problem
The editor is defaulting to the tab button being translated into the equivalent into 4 space indentation. Instead, the user should have control over indentation options.
Proposed solution
Add a notification in the bottom status bar, after the status-cursor location, that shows the spacing such as: Spacing: 2 spaces ^ but show it inside a dropdown button. However, it should be "dropup" button instead, as indicated by the ^, which indicates clicking on it will open choices above it (rather than below)
If the user clicks the Spacing button, they should have three options: 2 spaces .., 4 spaces ...., and Tab ⇥ (ending with U+21E5 character). By default, 2 spaces should be selected, unless the file is named Makefile or *.makefile in which case Tab should be the default. The selection should be file-specific so that different standards can be applied to different files of the same project. The selection should affect the indentation of the editor, such as when the user enters a [tab] or when the editor automatically indents in a nested code segment. If a new standard is selected, it should be the default for all future files, with the exception of Makefiles (previously mentioned) should always default to a tab.
The dropup selections should also include an option (separated by a horizontal line) for "Apply to file") which if clicked, applies the new indentation standard to the existing code in the open file. For instance, if a file has 4 spaces for each level of indentation is used but the user selects "2 spaces .." then all indentations that are 4 spaces should be converted to 2.
Alternatives considered
No response
Acceptance criteria
No response
Suggested priority
Low
Additional context
No response
Before submitting
- I searched existing issues and did not find an existing request for this feature.
Activity
kbuffardi commentedon Nov 6, 2026
Confirmed implementation plan
The original file-specific wording is superseded by the confirmed behavior below:
Makefileor matching*.makefileas the Makefile category; all other files use the general category.Apply to fileconverts only the active file's leading indentation, preserves alignment and continuation whitespace, and produces one undoable edit.Implementation will add a status-bar dropup after the cursor status, persistent settings, Monaco indentation updates, active-tab category handling, and focused regression coverage. The implementation will be submitted in a pull request that closes #131.
kbuffardi commentedon Nov 6, 2026
Follow-up correction
User feedback:
The implementation now makes only the selected radio option bold, closes the dropup on outside clicks without mutating settings, and detects active-document indentation before applying the selected style. Regression coverage was added and PR #133 was updated.
kbuffardi commentedon Nov 6, 2026
Follow-up visual refinement
User feedback:
PR #133 now uses the upward chevron
⌃in the static control and dynamic label. Focused spacing tests and lint pass.kbuffardi commentedon Nov 6, 2026
Revised implementation plan: authoritative editor spacing
User feedback:
Root causes
tabSize/insertSpacesvalues.indentSize, so nested auto-indentation retains two spaces.Planned correction
editor.js: initialize and update Monaco withdetectIndentation: false, plus alignedtabSize,indentSize, andinsertSpacesvalues.Acceptance criteria
kbuffardi commentedon Nov 6, 2026
Implementation update: selected spacing is authoritative
User feedback:
The fix now disables Monaco's content-based indentation detection and sets
tabSize,indentSize, andinsertSpacestogether for every selection. This prevents existing two-space content from overriding Tab or four-space behavior, without changing document text during selection. PR #133 and localdist/outputs were rebuilt with the correction.