adds vscode to dotfiles
This commit is contained in:
@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
script_file=$0
|
||||
while [ -h "$script_file" ]; do
|
||||
script_file=$(readlink $script_file)
|
||||
done
|
||||
basedir=$(dirname "$(echo "$script_file" | sed -e 's,\\,/,g')")
|
||||
|
||||
# This file is placed in a stable (version-independent) location
|
||||
# and forwards to the currently installed version
|
||||
|
||||
# WSL detection borrowed from VS Code
|
||||
IN_WSL=false
|
||||
if [ -n "$WSL_DISTRO_NAME" ]; then
|
||||
# $WSL_DISTRO_NAME is available since WSL builds 18362, also for WSL2
|
||||
IN_WSL=true
|
||||
else
|
||||
WSL_BUILD=$(uname -r | sed -E 's/^[0-9.]+-([0-9]+)-Microsoft.*|.*/\1/')
|
||||
if [ -n "$WSL_BUILD" ]; then
|
||||
IN_WSL=true
|
||||
fi
|
||||
fi
|
||||
VSCODE_PATH=$(cat "$basedir/vscode-path")
|
||||
DEVCONTAINER_CLI_PATH=$script_file
|
||||
REMOTE_CONTAINERS_PATH=
|
||||
if [ -f "$basedir/remote-containers-path" ]; then
|
||||
REMOTE_CONTAINERS_PATH=$(cat "$basedir/remote-containers-path")
|
||||
if [ $IN_WSL = true ]; then
|
||||
REMOTE_CONTAINERS_PATH=$(wslpath -u $REMOTE_CONTAINERS_PATH)
|
||||
fi
|
||||
if [ ! -f "$REMOTE_CONTAINERS_PATH/dev-containers-user-cli/cli.js" ]; then
|
||||
REMOTE_CONTAINERS_PATH=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$REMOTE_CONTAINERS_PATH" ]; then
|
||||
echo "Failed to determine Dev Containers path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $IN_WSL = true ]; then
|
||||
export WSLENV="ELECTRON_RUN_AS_NODE/w:DEVCONTAINER_CLI_PATH/p:IN_WSL:WSL_DISTRO_NAME:$WSLENV"
|
||||
CLI=$(wslpath -m "$REMOTE_CONTAINERS_PATH/dev-containers-user-cli/cli.js")
|
||||
ELECTRON=$(wslpath -u "$VSCODE_PATH")
|
||||
|
||||
# TODO - piping to `cat` is a temporary workaround for the CRLF->LF conversion
|
||||
# that occurs when calling Windows Electron binary from WSL
|
||||
IN_WSL=$IN_WSL DEVCONTAINER_CLI_PATH="$DEVCONTAINER_CLI_PATH" ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@" | cat
|
||||
exit $?
|
||||
else
|
||||
ELECTRON="$VSCODE_PATH"
|
||||
CLI=$REMOTE_CONTAINERS_PATH/dev-containers-user-cli/cli.js
|
||||
DEVCONTAINER_CLI_PATH="$DEVCONTAINER_CLI_PATH" ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
|
||||
exit $?
|
||||
fi
|
@ -0,0 +1,37 @@
|
||||
@echo off
|
||||
@REM This file is placed in a stable (version-independent) location
|
||||
@REM and forwards to the currently installed version
|
||||
|
||||
setlocal
|
||||
SET DEVCONTAINER_CLI_PATH=%~f0
|
||||
SET VSCODE_PATH=
|
||||
|
||||
:vscode_path
|
||||
@REM Load the Code.exe path
|
||||
IF NOT exist "%~dp0vscode-path%" goto fail_vscode_path
|
||||
set /p VSCODE_PATH=<"%~dp0vscode-path%"
|
||||
IF exist "%VSCODE_PATH%" goto remote_container_path
|
||||
|
||||
:fail_vscode_path
|
||||
echo Failed to determine VS Code path
|
||||
exit 1
|
||||
|
||||
:remote_container_path
|
||||
|
||||
SET REMOTE_CONTAINERS_PATH=
|
||||
|
||||
@REM Check the remote-containers-path file
|
||||
@REM This is a cache (and enables Dev Containers development)
|
||||
IF NOT exist "%~dp0remote-containers-path%" goto fail_remote_container_path
|
||||
set /p REMOTE_CONTAINERS_PATH=<"%~dp0remote-containers-path%"
|
||||
IF exist "%REMOTE_CONTAINERS_PATH%\dev-containers-user-cli\cli.js" goto forwardcall
|
||||
|
||||
:fail_remote_container_path
|
||||
echo Failed to determine Dev Containers path
|
||||
exit 1
|
||||
|
||||
:forwardcall
|
||||
set ELECTRON_RUN_AS_NODE=1
|
||||
"%VSCODE_PATH%" "%REMOTE_CONTAINERS_PATH%\dev-containers-user-cli\\cli.js" %*
|
||||
|
||||
endlocal
|
@ -0,0 +1 @@
|
||||
/home/menno/.vscode/extensions/ms-vscode-remote.remote-containers-0.361.0
|
@ -0,0 +1 @@
|
||||
/usr/share/code/resources/app
|
@ -0,0 +1 @@
|
||||
8fe771453a595198d5c05cfe5dae733902c1ae7c7983b27c2c59b2b42752897a
|
@ -0,0 +1 @@
|
||||
/usr/share/code/code
|
@ -0,0 +1 @@
|
||||
stable
|
1823
VSCodeUser/globalStorage/storage.json
Normal file
1823
VSCodeUser/globalStorage/storage.json
Normal file
File diff suppressed because it is too large
Load Diff
1
VSCodeUser/profiles/-1e88b712/extensions.json
Normal file
1
VSCodeUser/profiles/-1e88b712/extensions.json
Normal file
File diff suppressed because one or more lines are too long
1
VSCodeUser/profiles/-6aea8e73/extensions.json
Normal file
1
VSCodeUser/profiles/-6aea8e73/extensions.json
Normal file
File diff suppressed because one or more lines are too long
18
VSCodeUser/profiles/-6aea8e73/settings.json
Normal file
18
VSCodeUser/profiles/-6aea8e73/settings.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"python.analysis.autoImportCompletions": true,
|
||||
"python.analysis.fixAll": ["source.unusedImports"],
|
||||
"editor.defaultFormatter": "ms-python.black-formatter",
|
||||
"files.exclude": {
|
||||
"**/__pycache__": true,
|
||||
"**/.cache": true,
|
||||
"**/.coverage": true,
|
||||
"**/.coverage.*": true,
|
||||
"**/.hypothesis": true,
|
||||
"**/.mypy_cache": true,
|
||||
"**/.nox": true,
|
||||
"**/.pytest_cache": true,
|
||||
"**/.ruff_cache": true,
|
||||
"**/.tox": true
|
||||
}
|
||||
|
||||
}
|
151
VSCodeUser/profiles/-6aea8e73/snippets/python.json
Normal file
151
VSCodeUser/profiles/-6aea8e73/snippets/python.json
Normal file
@ -0,0 +1,151 @@
|
||||
|
||||
{
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": ["if ${1:expression}:", "\t${2:pass}"],
|
||||
"description": "Code snippet for an if statement"
|
||||
},
|
||||
"if/else": {
|
||||
"prefix": "if/else",
|
||||
"body": ["if ${1:condition}:", "\t${2:pass}", "else:", "\t${3:pass}"],
|
||||
"description": "Code snippet for an if statement with else"
|
||||
},
|
||||
"elif": {
|
||||
"prefix": "elif",
|
||||
"body": ["elif ${1:expression}:", "\t${2:pass}"],
|
||||
"description": "Code snippet for an elif"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": ["else:", "\t${1:pass}"],
|
||||
"description": "Code snippet for an else"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": ["while ${1:expression}:", "\t${2:pass}"],
|
||||
"description": "Code snippet for a while loop"
|
||||
},
|
||||
"while/else": {
|
||||
"prefix": "while/else",
|
||||
"body": ["while ${1:expression}:", "\t${2:pass}", "else:", "\t${3:pass}"],
|
||||
"description": "Code snippet for a while loop with else"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": ["for ${1:target_list} in ${2:expression_list}:", "\t${3:pass}"],
|
||||
"description": "Code snippet for a for loop"
|
||||
},
|
||||
"for/else": {
|
||||
"prefix": "for/else",
|
||||
"body": ["for ${1:target_list} in ${2:expression_list}:", "\t${3:pass}", "else:", "\t${4:pass}"],
|
||||
"description": "Code snippet for a for loop with else"
|
||||
},
|
||||
"try/except": {
|
||||
"prefix": "try/except",
|
||||
"body": ["try:", "\t${1:pass}", "except ${2:expression} as ${3:identifier}:", "\t${4:pass}"],
|
||||
"description": "Code snippet for a try/except statement"
|
||||
},
|
||||
"try/finally": {
|
||||
"prefix": "try/finally",
|
||||
"body": ["try:", "\t${1:pass}", "finally:", "\t${2:pass}"],
|
||||
"description": "Code snippet for a try/finally statement"
|
||||
},
|
||||
"try/except/else": {
|
||||
"prefix": "try/except/else",
|
||||
"body": [
|
||||
"try:",
|
||||
"\t${1:pass}",
|
||||
"except ${2:expression} as ${3:identifier}:",
|
||||
"\t${4:pass}",
|
||||
"else:",
|
||||
"\t${5:pass}"
|
||||
],
|
||||
"description": "Code snippet for a try/except/else statement"
|
||||
},
|
||||
"try/except/finally": {
|
||||
"prefix": "try/except/finally",
|
||||
"body": [
|
||||
"try:",
|
||||
"\t${1:pass}",
|
||||
"except ${2:expression} as ${3:identifier}:",
|
||||
"\t${4:pass}",
|
||||
"finally:",
|
||||
"\t${5:pass}"
|
||||
],
|
||||
"description": "Code snippet for a try/except/finally statement"
|
||||
},
|
||||
"try/except/else/finally": {
|
||||
"prefix": "try/except/else/finally",
|
||||
"body": [
|
||||
"try:",
|
||||
"\t${1:pass}",
|
||||
"except ${2:expression} as ${3:identifier}:",
|
||||
"\t${4:pass}",
|
||||
"else:",
|
||||
"\t${5:pass}",
|
||||
"finally:",
|
||||
"\t${6:pass}"
|
||||
],
|
||||
"description": "Code snippet for a try/except/else/finally statement"
|
||||
},
|
||||
"with": {
|
||||
"prefix": "with",
|
||||
"body": ["with ${1:expression} as ${2:target}:", "\t${3:pass}"],
|
||||
"description": "Code snippet for a with statement"
|
||||
},
|
||||
"def": {
|
||||
"prefix": "def",
|
||||
"body": ["def ${1:funcname}(${2:parameter_list}):", "\t\"\"\"", "\t${3:docstring}", "\t\"\"\"","\t${4:pass}"],
|
||||
"description": "Code snippet for a function definition"
|
||||
},
|
||||
"def(class method)": {
|
||||
"prefix": "def(class method)",
|
||||
"body": ["def ${1:funcname}(self, ${2:parameter_list}):", "\t\"\"\"", "\t${3:docstring}", "\t\"\"\"", "\t${4:pass}"],
|
||||
"description": "Code snippet for a class method"
|
||||
},
|
||||
"def(static class method)": {
|
||||
"prefix": "def(static class method)",
|
||||
"body": ["@staticmethod", "def ${1:funcname}(${2:parameter_list}):", "\t\"\"\"", "\t${3:docstring}", "\t\"\"\"", "\t${4:pass}"],
|
||||
"description": "Code snippet for a static class method"
|
||||
},
|
||||
"def(abstract class method)": {
|
||||
"prefix": "def(abstract class method)",
|
||||
"body": ["def ${1:funcname}(self, ${2:parameter_list}):", "\t\"\"\"", "\t${3:docstring}", "\t\"\"\"", "\traise NotImplementedError"],
|
||||
"description": "Code snippet for an abstract class method"
|
||||
},
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"body": ["class ${1:classname}(${2:object}):", "\t\"\"\"", "\t${3:docstring}", "\t\"\"\"", "\t${4:pass}"],
|
||||
"description": "Code snippet for a class definition"
|
||||
},
|
||||
"lambda": {
|
||||
"prefix": "lambda",
|
||||
"body": ["lambda ${1:parameter_list}: ${2:expression}"],
|
||||
"description": "Code snippet for a lambda statement"
|
||||
},
|
||||
"if(main)": {
|
||||
"prefix": "__main__",
|
||||
"body": ["if __name__ == \"__main__\":", " ${1:pass}"],
|
||||
"description": "Code snippet for a `if __name__ == \"__main__\": ...` block"
|
||||
},
|
||||
"async/def": {
|
||||
"prefix": "async/def",
|
||||
"body": ["async def ${1:funcname}(${2:parameter_list}):", "\t${3:pass}"],
|
||||
"description": "Code snippet for an async statement"
|
||||
},
|
||||
"async/for": {
|
||||
"prefix": "async/for",
|
||||
"body": ["async for ${1:target} in ${2:iter}:", "\t${3:block}"],
|
||||
"description": "Code snippet for an async for statement"
|
||||
},
|
||||
"async/for/else": {
|
||||
"prefix": "async/for/else",
|
||||
"body": ["async for ${1:target} in ${2:iter}:", "\t${3:block}", "else:", "\t${4:block}"],
|
||||
"description": "Code snippet for an async for statement with else"
|
||||
},
|
||||
"async/with": {
|
||||
"prefix": "async/with",
|
||||
"body": ["async with ${1:expr} as ${2:var}:", "\t${3:block}"],
|
||||
"description": "Code snippet for an async with statement"
|
||||
}
|
||||
}
|
1
VSCodeUser/profiles/-6f7e2f91/extensions.json
Normal file
1
VSCodeUser/profiles/-6f7e2f91/extensions.json
Normal file
@ -0,0 +1 @@
|
||||
[{"identifier":{"id":"github.copilot","uuid":"23c4aeee-f844-43cd-b53e-1113e483f1a6"},"version":"1.180.0","location":{"$mid":1,"path":"/home/menno/.vscode/extensions/github.copilot-1.180.0","scheme":"file"},"relativeLocation":"github.copilot-1.180.0","metadata":{"id":"23c4aeee-f844-43cd-b53e-1113e483f1a6","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1713784569574,"pinned":false,"source":"gallery"}},{"identifier":{"id":"github.copilot-chat","uuid":"7ec7d6e6-b89e-4cc5-a59b-d6c4d238246f"},"version":"0.14.1","location":{"$mid":1,"path":"/home/menno/.vscode/extensions/github.copilot-chat-0.14.1","scheme":"file"},"relativeLocation":"github.copilot-chat-0.14.1","metadata":{"id":"7ec7d6e6-b89e-4cc5-a59b-d6c4d238246f","publisherId":"7c1c19cd-78eb-4dfb-8999-99caf7679002","publisherDisplayName":"GitHub","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1713784569577,"pinned":false,"source":"gallery"}},{"identifier":{"id":"dart-code.flutter","uuid":"f6c3ec04-6057-4d9c-b997-69cba07a6158"},"version":"3.86.0","location":{"$mid":1,"path":"/home/menno/.vscode/extensions/dart-code.flutter-3.86.0","scheme":"file"},"relativeLocation":"dart-code.flutter-3.86.0","metadata":{"id":"f6c3ec04-6057-4d9c-b997-69cba07a6158","publisherId":"a606ecbb-a8fb-4c35-b29a-5e8842d82af2","publisherDisplayName":"Dart Code","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1713784575375,"pinned":false,"source":"gallery"}},{"identifier":{"id":"alexisvt.flutter-snippets","uuid":"2972da43-20b6-4207-8d1e-9cbc7529bd04"},"version":"3.0.0","location":{"$mid":1,"path":"/home/menno/.vscode/extensions/alexisvt.flutter-snippets-3.0.0","scheme":"file"},"relativeLocation":"alexisvt.flutter-snippets-3.0.0","metadata":{"id":"2972da43-20b6-4207-8d1e-9cbc7529bd04","publisherId":"b130ae37-5a27-46ef-b190-7a27d2deb769","publisherDisplayName":"Alexis Villegas Torres","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1713784576691,"pinned":false,"source":"gallery"}},{"identifier":{"id":"dart-code.dart-code","uuid":"f57f68ea-9ee8-42b5-9a97-041d3e4278c4"},"version":"3.86.0","location":{"$mid":1,"path":"/home/menno/.vscode/extensions/dart-code.dart-code-3.86.0","scheme":"file"},"relativeLocation":"dart-code.dart-code-3.86.0","metadata":{"id":"f57f68ea-9ee8-42b5-9a97-041d3e4278c4","publisherId":"a606ecbb-a8fb-4c35-b29a-5e8842d82af2","publisherDisplayName":"Dart Code","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1713784575384,"pinned":false,"source":"gallery"}},{"identifier":{"id":"hirantha.json-to-dart","uuid":"1be06a78-ee88-4acf-a10c-5187b3c184b0"},"version":"3.5.8","location":{"$mid":1,"fsPath":"/home/menno/.vscode/extensions/hirantha.json-to-dart-3.5.8","external":"file:///home/menno/.vscode/extensions/hirantha.json-to-dart-3.5.8","path":"/home/menno/.vscode/extensions/hirantha.json-to-dart-3.5.8","scheme":"file"},"relativeLocation":"hirantha.json-to-dart-3.5.8","metadata":{"id":"1be06a78-ee88-4acf-a10c-5187b3c184b0","publisherId":"d3beab7b-9949-4b14-8264-424d1fda93e5","publisherDisplayName":"hirantha","targetPlatform":"undefined","updated":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"installedTimestamp":1713784658668,"pinned":false,"source":"gallery"}}]
|
17
VSCodeUser/settings.json
Normal file
17
VSCodeUser/settings.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/.trunk/*actions/": true,
|
||||
"**/.trunk/*logs/": true,
|
||||
"**/.trunk/*notifications/": true,
|
||||
"**/.trunk/*out/": true,
|
||||
"**/.trunk/*plugins/": true
|
||||
},
|
||||
"files.watcherExclude": {
|
||||
"**/.trunk/*actions/": true,
|
||||
"**/.trunk/*logs/": true,
|
||||
"**/.trunk/*notifications/": true,
|
||||
"**/.trunk/*out/": true,
|
||||
"**/.trunk/*plugins/": true
|
||||
},
|
||||
"editor.defaultFormatter": "trunk.io"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"folder": "file:///home/menno/Services"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"folder": "file:///mnt/512GB/automatic"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"folder": "file:///home/menno/.dotfiles"
|
||||
}
|
Reference in New Issue
Block a user