Visual Studio Code: Difference between revisions

From David's Wiki
(Created page with "Visual Studio Code")
 
No edit summary
 
Line 1: Line 1:
Visual Studio Code
Visual Studio Code
==Preferences==
===Python Formatter===
Open your preferences file and set the following to use yapf:
<pre>
"python.formatting.provider": "yapf",
"python.formatting.yapfArgs": [
  "--style",
  "{based_on_style: yapf, indent_width: 4}"
],
"editor.formatOnPaste": true,
"editor.formatOnType": true
</pre>

Latest revision as of 14:38, 14 July 2021

Visual Studio Code

Preferences

Python Formatter

Open your preferences file and set the following to use yapf:

"python.formatting.provider": "yapf",
"python.formatting.yapfArgs": [
  "--style",
  "{based_on_style: yapf, indent_width: 4}"
],
"editor.formatOnPaste": true,
"editor.formatOnType": true