Skip to content

Instantly share code, notes, and snippets.

@luizomf
Created November 4, 2021 23:58
Show Gist options
  • Save luizomf/276820fed43130edaf4fa8ab3c57a0a1 to your computer and use it in GitHub Desktop.
Save luizomf/276820fed43130edaf4fa8ab3c57a0a1 to your computer and use it in GitHub Desktop.
Configuração do VS Code para Python e Django.
{
"window.zoomLevel": 0,
"python.languageServer": "Pylance", // ms-python.vscode-pylance
"python.testing.unittestEnabled": false, // ms-python.python
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [], // -x to bail
"python.linting.flake8Enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.pylintArgs": [
"--load-plugins=pylint_django",
"--errors-only"
],
"python.formatting.autopep8Args": ["--indent-size=4"],
"python.defaultInterpreterPath": "venv/bin/python",
"[python]": {
"editor.defaultFormatter": "ms-python.python", // ms-python.python
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"[html]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "vscode.html-language-features",
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
},
"[django-html]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "vscode.html-language-features",
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
},
"files.associations": {
"*.js": "javascript",
"*.jsx": "javascriptreact",
"*.xml": "html",
"*.svg": "html",
"*.html": "html",
"django-html": "html", // batisteo.vscode-django
"**/*.html": "html",
"**/templates/**/*.html": "django-html",
"**/base_templates/**/*.html": "django-html",
"**/requirements{/**,*}.{txt,in}": "pip-requirements"
},
"emmet.includeLanguages": {
"django-html": "html", // batisteo.vscode-django
"javascript": "javascriptreact",
"typescript": "typescriptreact"
}
}
@PatrickPFR
Copy link

Quando colo essas configurações no meu VScode, ele aponta dois problemas: "source.organizeImports": true (Aqui ele diz que o esperado é "string" ao invés de True) e o seguinte é: "editor.defaultFormatter": "ms-python.python"(Valor não é aceito. Valores válidos: null, "vscode.css-linguagem-features", "vscode.html-linguagem-features", "vscode.json-linguagem-features", "vscode.markdown-linguagem-features", "vscode.markdown- matemática", "recursos de linguagem vscode.php", "recursos de linguagem vscode.typescript", "vscode.configuration-editing", "vscode.debug-auto-launch", "vscode.debug-server-ready" , "vscode.emmet", "vscode.extension-editing", "vscode.git", "vscode.git-base", "vscode.github", "vscode.github-authentication", "vscode.grunt", " vscode.gulp", "vscode.ipynb", "vscode.jake", "ms-vscode.js-debug", "ms-vscode.js-debug-companion", "vscode.media-preview", "vscode. conflito de mesclagem", "vscode.microsoft-authentication", "vscode.npm", "vscode.references-view", "vscode.search-result", "vscode.simple-browser", "vscode.tunnel-forwarding" , "ms-vscode.vscode-js-profile-table").

@HijoNoleto
Copy link

Qual foi a solução utilizada?

@fabianolopes3333fr
Copy link

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment