I'm using Visual Studio 2022.
How can I reduce the space around the line numbers?
Randomly found a solution. RMB on line numbers, there will be option "lightbulb margin". off to remove those indents.
Try to disable "Inheritance Margin". At Visual Studio, CTRL+Q and type "Inheritance Margin". At Options, unmark "Show inheritance margin" (at the bottom).