-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gen-vscode-manual-config command and config
At work, my VSCode config can only be edited through the VSCode GUI. In order to version control it, check it in to homegit and add a small Python program that merges common (shared by home and work) config with work-specific config. Relevant issues: - gitpod-io/openvscode-server#199 - gitpod-io/openvscode-server#535 - microsoft/vscode#15909
- Loading branch information
1 parent
f1f6dbb
commit 57fe046
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"workbench.colorTheme": "Default Dark Modern", | ||
"keyboard.dispatch": "keyCode", | ||
"vim.vimrc.enable": true, | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.python" | ||
}, | ||
"vim.handleKeys": { | ||
"<C-p>": false, | ||
}, | ||
"vim.useSystemClipboard": true, | ||
"files.autoSave": "onFocusChange", | ||
"editor.autoClosingBrackets": "never", | ||
"security.workspace.trust.untrustedFiles": "open", | ||
"files.insertFinalNewline": true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python3 | ||
import json5 | ||
import os | ||
from pathlib import Path | ||
|
||
|
||
def main(): | ||
with open( | ||
Path(os.environ["HOME"]) / ".config/vscode-manual-config/common.json5" | ||
) as f: | ||
common = json5.load(f) | ||
|
||
try: | ||
with open( | ||
Path(os.environ["HOME"]) / ".config/vscode-manual-config/local.json5" | ||
) as f: | ||
local = json5.load(f) | ||
except: | ||
local = {} | ||
|
||
merged = common | local | ||
|
||
print(json5.dumps(merged, indent=4)) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |