This is a plugin for Obsidian that fixes tab size according to the settings.
As reported on the forum:
Obsidian has setting for tab size:

But Obsidian partially ignores this setting and always inserts 4 spaces when you press Tab button in the editor, if you have setting Indent using tabs disabled.
This plugin fixes the editor tab size making it to match Indent visual width setting.
The plugin is not available in the official Community Plugins repository yet.
To install the latest beta release of this plugin (regardless if it is available in the official Community Plugins repository or not), follow these steps:
Add plugin button once and wait a few seconds for the plugin to install.By default, debug messages for this plugin are hidden.
To show them, run the following command in the DevTools Console:
window.DEBUG.enable('fix-tab-size');
For more details, refer to the documentation.
See my other Obsidian resources.