Enabling indentation guides in Monaco is done by setting renderIndentGuides
to true in Monaco.IEditorOptions
. However this results in indentation guides that are not properly indented:
Language in the editor is set to "javascript" and tabstops are disabled (thus using the the default of 4 spaces for one indentation step). Which setting must be changed to make the indentation guides follow the set indentation width in the editor?
I cannot confirm that this solves the issue since I'm not able to fully reproduce it, but for those who land here looking for an advanced indentation configuration, here is my example configuration for XML language, containing multiple options you can play around with in Monaco editor playground. (just copy, paste, run):
indentationRules
are borrowed from vscode HTML extension configuration and simplified. More information about it here.