Skip to content

Commit

Permalink
DX: show editor ruler only in Python files
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Oct 6, 2023
1 parent a3b6ab0 commit 3ecdf10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.defaultFormatter": "ms-python.black-formatter"
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.rulers": [88]
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand All @@ -30,7 +31,6 @@
"coverage-gutters.showLineCoverage": true,
"cSpell.enabled": true,
"editor.formatOnSave": true,
"editor.rulers": [88],
"files.watcherExclude": {
"**/*_cache/**": true,
"**/.eggs/**": true,
Expand Down
5 changes: 4 additions & 1 deletion src/repoma/check_dev_files/black.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ def main(has_notebooks: bool) -> None:
executor(
set_sub_setting,
"[python]",
{"editor.defaultFormatter": "ms-python.black-formatter"},
{
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.rulers": [88],
},
)
executor(remove_precommit_hook, "nbqa-black")
executor.finalize()
Expand Down
1 change: 1 addition & 0 deletions src/repoma/check_dev_files/vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def _update_settings(has_notebooks: bool) -> None:

def _remove_outdated_settings() -> None:
outdated_settings = [
"editor.rulers",
"githubPullRequests.telemetry.enabled",
"gitlens.advanced.telemetry.enabled",
"python.analysis.diagnosticMode",
Expand Down

0 comments on commit 3ecdf10

Please sign in to comment.