Skip to content

Commit

Permalink
DX: configure rewrap extension for VSCode
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Oct 6, 2023
1 parent 82a5355 commit 03ce923
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"editor.formatOnSave": false
},
"[git-commit]": {
"editor.rulers": [72],
"rewrap.wrappingColumn": 72
},
"[json]": {
Expand Down
19 changes: 19 additions & 0 deletions src/repoma/check_dev_files/vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ def main(has_notebooks: bool) -> None:

def _update_extensions() -> None:
executor = Executor()
executor(

Check warning on line 18 in src/repoma/check_dev_files/vscode.py

View check run for this annotation

Codecov / codecov/patch

src/repoma/check_dev_files/vscode.py#L18

Added line #L18 was not covered by tests
vscode.add_extension_recommendation,
"stkb.rewrap", # cspell:ignore stkb
)
executor(
vscode.remove_extension_recommendation,
"travisillig.vscode-json-stable-stringify",
Expand All @@ -31,6 +35,21 @@ def _update_extensions() -> None:

def _update_settings(has_notebooks: bool) -> None:
executor = Executor()
executor(

Check warning on line 38 in src/repoma/check_dev_files/vscode.py

View check run for this annotation

Codecov / codecov/patch

src/repoma/check_dev_files/vscode.py#L38

Added line #L38 was not covered by tests
vscode.set_setting,
{
"editor.formatOnSave": True,
"rewrap.wrappingColumn": 88, # black
},
)
executor(

Check warning on line 45 in src/repoma/check_dev_files/vscode.py

View check run for this annotation

Codecov / codecov/patch

src/repoma/check_dev_files/vscode.py#L45

Added line #L45 was not covered by tests
vscode.set_sub_setting,
"[git-commit]",
{
"editor.rulers": [72],
"rewrap.wrappingColumn": 72,
},
)
executor(_remove_outdated_settings)
executor(_update_doc_settings)
if has_notebooks:
Expand Down

0 comments on commit 03ce923

Please sign in to comment.