Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🏗🔧:reconfigure vscode for smoother startup #696

Merged
merged 19 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 27 additions & 22 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
// For format details, see https://aka.ms/devcontainer.json. For config options,
// see documentation located at the following URL:
// https://github.com/OpenINF/docker-fisher/tree/main/library-scripts/docs
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-outside-of-docker
// For config options, see the README at:
// https://github.com/devcontainers/templates/tree/main/src/docker-outside-of-docker
OpenINFbot marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "Docker outside of Docker",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/javascript-node:18-bullseye"
"name": "Docker outside of Docker",
OpenINFbot marked this conversation as resolved.
Show resolved Hide resolved
// Or use a Dockerfile or Docker Compose file.
// TODO(DerekNonGeneric): update comment to include link to repo
"image": "docker.io/openinf/centos7-fisher:latest",

"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"version": "latest",
"enableNonRootDocker": "true",
"moby": "false"
}
},
// TODO(): remove this whole feature once we have replicated it
"features": {
OpenINFbot marked this conversation as resolved.
Show resolved Hide resolved
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"version": "latest",
"enableNonRootDocker": "true",
"moby": "false"
}
},

// Use this environment variable if you need to bind mount your local source code into a new container.
"remoteEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}",
"PATH": "${containerEnv:PATH}:~/.rbenv/shims/"
}
// Use this environment variable if you need to bind mount your local source
// code into a new container.
"remoteEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}",
"PATH": "${containerEnv:PATH}:~/.rbenv/shims/"
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// Use 'forwardPorts' to make a list of ports inside the container available
// locally.
"forwardPorts": [
// Jekyll server
4000,
Expand All @@ -35,9 +39,10 @@
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "fish .devcontainer/post-create.fish",

// Configure tool-specific properties.
// "customizations": {},
// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
// Uncomment to connect as root instead.
// More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "node"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"remoteUser": "node"
"remoteUser": "node"

i need to validate this, so maybe we run it before committing alll these changes

This comment was marked as resolved.

Copy link
Member Author

@DerekNonGeneric DerekNonGeneric Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here are the only choices that make sense to me/us, what's the deal w/ a user named "node" (?), ugh:

Suggested change
"remoteUser": "node"
"remoteUser": "dory"
Suggested change
"remoteUser": "node"
"remoteUser": "nemo"

you would think i would know, right? ahaha, those Microsofters working on VS Code is my current best guess…

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo!

}
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
* text=auto eol=lf linguist-detectable
.*.jsonc diff=jsonc linguist-language=jsonc
.*.json5 diff=json5 linguist-language=json5
.devcontainer/*.json diff=jsonc linguist-language=jsonc
.eslintrc.json diff=jsonc linguist-language=jsonc
.snyk diff=yaml linguist-language=yaml
.devcontainer/*.json diff=jsonc linguist-language=jsonc
.vscode/*.json diff=jsonc linguist-language=jsonc
build/** linguist-generated=false
doc/** linguist-documentation
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
"dbaeumer.vscode-eslint",
// https://marketplace.visualstudio.com/items?itemName=dprint.dprint
"dprint.dprint",
// "dprint.dprint",
// https://marketplace.visualstudio.com/items?itemName=editorconfig.editorconfig
"editorconfig.editorconfig",
// https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
Expand Down
81 changes: 67 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

"editor.stickyScroll.enabled": false,
"editor.codeLens": true,
"eslint.format.enable": true,
"editor.formatOnSave": true,

"[javascript][json][json5][jsonc][typescript][yaml]": {
Expand All @@ -21,12 +20,12 @@
"editor.defaultFormatter": "Shopify.theme-check-vscode"
},

"[toml]": {
"editor.codeActionsOnSave": {
"source.fixAll.dprint": "explicit"
},
"editor.defaultFormatter": "dprint.dprint"
},
// "[toml]": {
// "editor.codeActionsOnSave": {
// "source.fixAll.dprint": "explicit"
// },
// "editor.defaultFormatter": "dprint.dprint"
// },

"[markdown]": {
"editor.codeActionsOnSave": {
Expand All @@ -44,8 +43,9 @@
// Terminal
//////////////////////////////////////////////////////////////////////////////

"terminal.integrated.useWslProfiles": true,

// A set of terminal profile customizations for Linux that allows adding,
// removing, or changing how terminals are launched. Profiles are made up of
// a mandatory path, optional arguments, and other presentation options.
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash"
Expand All @@ -63,10 +63,62 @@
"pwsh": null
},
DerekNonGeneric marked this conversation as resolved.
Show resolved Hide resolved

// "terminal.integrated.defaultProfile.linux": "bash",
// The default terminal profile on Linux.
"terminal.integrated.defaultProfile.linux": "fish",
DerekNonGeneric marked this conversation as resolved.
Show resolved Hide resolved

// TODO(DerekNonGeneric):
// A set of terminal profile customizations for macOS which allows adding,
// removing or changing how terminals are launched. Profiles are made up of
// a mandatory path, optional arguments and other presentation options.
"terminal.integrated.profiles.osx": {},

// TODO(DerekNonGeneric): The default terminal profile on macOS.
"terminal.integrated.defaultProfile.osx": null,

// Controls whether or not WSL distros are shown in the terminal dropdown.
// Not actually recommended, but useful one-offs if that may be the case.
"terminal.integrated.useWslProfiles": true,

// A set of terminal profile customizations for Windows which allows adding,
// removing or changing how terminals are launched. Profiles are made up of
// a mandatory path, optional arguments and other presentation options.
"terminal.integrated.profiles.windows": {
"Git Bash": null,
"pwsh": {
"path": "pwsh.exe",
"source": "PowerShell",
"icon": "terminal-powershell",
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe",
],
"icon": "terminal-cmd",
},
},

// The default terminal profile on Windows.
"terminal.integrated.defaultProfile.windows": "pwsh",

// Controls whether the terminal will ignore bracketed paste mode even if the
// terminal was put into the mode, omitting the `\x1b[200~` and `\x1b[201~`
// sequences when pasting. This is useful when the shell is not respecting the
// mode which can happen in sub-shells for example.
"terminal.integrated.ignoreBracketedPasteMode": true,

// Controls the working directory a split terminal starts with.
// - workspaceRoot: A new split terminal will use the workspace root as the
// working directory. In a multi-root workspace a choice for which root
// folder to use is offered.
// - initial: A new split terminal will use the working directory that the
// parent terminal started with.
// - inherited: On macOS and Linux, a new split terminal will use the working
// directory of the parent terminal. On Windows, this behaves the same as
// initial.
"terminal.integrated.splitCwd": "workspaceRoot",

// Automatic script injection has been disabled.
"terminal.integrated.shellIntegration.enabled": false,
DerekNonGeneric marked this conversation as resolved.
Show resolved Hide resolved

// Files
Expand Down Expand Up @@ -109,7 +161,6 @@
// This setting will control whether multiline comments are styled using the
// annotation tags. If false, multiline comments will be presented w/o decor.
"better-comments.multilineComments": true,

"better-comments.tags": [
{
"tag": "//",
Expand All @@ -118,20 +169,22 @@
],

// Dprint
"dprint.path": "~/.dprint/bin/dprint",
/////////////////////////////////////////////

// "dprint.path": "~/.dprint/bin/dprint",

// EditorConfig (https://editorconfig.org/)
/////////////////////////////////////////////

// The following settings should be inherited from the .editorconfig file and
// need not be re-specified in this file: files.encoding, files.eol,
// files.insertFinalNewline, and files.trimTrailingWhitespace.

"editorconfig.generateAuto": false,

// ESLint (ESLint is a separate extension)
/////////////////////////////////////////////

"eslint.format.enable": true,
"eslint.validate": [
"javascript",
"json",
Expand All @@ -141,7 +194,6 @@
"typescript",
"yaml"
],

"eslint.workingDirectories": [
"./"
],
Expand All @@ -158,3 +210,4 @@
}
}
}