I've been using VScode for a while - and have been experiencing a weird extra space recently (anecdotally since I've upgraded to the most recent version).
So, this happens when editing python if there is a closing bracket and I hit enter to move text to the next line:
This doesn't happen if there isn't a closing bracket, but is annoying because the closing bracket is auto-added when I put in the opening bracket, and so this happens way more often than it should.
So, I start with this:
def function():
cases = pq.read_table(
"filename.parquet",
columns = ["docket_number"]
Press enter, and then I get (dots are spaces, but added to highlight the issue):
def function():
cases = pq.read_table(
"filename.parquet",
columns = [
....."docket_number"]
And the indent should be 4. If there wasn't a closing bracket, it correctly give me this:
def function():
cases = pq.read_table(
"filename.parquet",
columns = [
...."docket_number"
So, what the heck governs this?
You probably have editor.formatOnType
enabled, turn it off (untick it),
or add the following in settings.json
"editor.formatOnType": false,