Skip to content

Instantly share code, notes, and snippets.

@josephspurrier
Last active May 29, 2022 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josephspurrier/15a74871d65926c7415b55fe4b8d2946 to your computer and use it in GitHub Desktop.
Save josephspurrier/15a74871d65926c7415b55fe4b8d2946 to your computer and use it in GitHub Desktop.
Visual Studio Code Settings
{
"recommendations": [
"dbaeumer.vscode-eslint",
"golang.go",
"yzhang.markdown-all-in-one",
"equinusocio.vsc-material-theme-icons",
"gruntfuggly.todo-tree",
"redhat.vscode-yaml"
]
}
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"envrc File": {
"prefix": "envrc",
"body": "# Go path information.\r\nexport GOPATH=$(pwd)\r\nexport GOBIN=$(pwd)/bin\r\nexport PATH=$$PATH:~/godev/gotools/bin:$$GOBIN\r\n\r\n# Load the shared environment variables (shared with Makefile).\r\n# Export the vars in .env into the shell.\r\n# export $(egrep -v '^#' .env | xargs)\r\n\r\n# AWS CLI.\r\n# export AWS_ACCESS_KEY_ID=\r\n# export AWS_SECRET_ACCESS_KEY=\r\n# export AWS_SESSION_TOKEN=\r\n# export AWS_DEFAULT_REGION=us-east-1\r\n\r\n# Go SDK.\r\n# export AWS_REGION=us-east-1",
"description": "Creates an envrc file."
},
}
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+home",
"command": "cursorTop",
"when": "textInputFocus"
},
{
"key": "ctrl+end",
"command": "cursorBottom",
"when": "textInputFocus"
},
{
"key": "cmd+home",
"command": "cursorTop",
"when": "textInputFocus"
},
{
"key": "cmd+end",
"command": "cursorBottom",
"when": "textInputFocus"
},
{
"key": "shift+cmd+home",
"command": "cursorTopSelect",
"when": "textInputFocus"
},
{
"key": "shift+cmd+end",
"command": "cursorBottomSelect",
"when": "textInputFocus"
},
]
// Place your settings in this file to overwrite the default settings
{
//
// Workbench.
//
"workbench.iconTheme": "eq-material-theme-icons", // Requires ext: Material Theme Icons.
"workbench.colorTheme": "Default Dark+",
"workbench.startupEditor": "newUntitledFile",
"explorer.confirmDragAndDrop": false,
//
// Editor.
//
"editor.formatOnSave": true,
"editor.rulers": [
80,
120
],
"editor.fontFamily": "'Hack FC Ligatured', Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 12,
"editor.bracketPairColorization.enabled": false,
//
// Terminal
//
"terminal.integrated.fontFamily": "'Hack FC Ligatured', Menlo, Monaco, 'Courier New', monospace",
"terminal.integrated.defaultProfile.osx": "zsh",
//
// Files.
//
"files.associations": {
"*.tmpl": "gohtml",
"*.html": "html"
},
"files.autoSave": "afterDelay",
//
// Git.
//
"git.confirmSync": false,
"git.enabled": true,
"git.autofetch": true,
"git.enableSmartCommit": true,
//"git.path": "", // Windows.
//
// Language.
//
// "[vue]": {
// "editor.tabSize": 2
// },
"[terraform]": {
"editor.formatOnSave": true
},
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
//
// Emmet. Should also install the Extension: https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets
//
"emmet.triggerExpansionOnTab": true,
"emmet.showSuggestionsAsSnippets": true,
//
// Go.
//
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.lintTool": "golint",
"go.useLanguageServer": true,
"go.toolsEnvVars": {
"GO111MODULE": "on",
},
"go.inferGopath": false,
"go.toolsGopath": "/Users/josephspurrier/godev/gotools",
//"go.goroot": "~/.gvm/gos/go1.18.2",
//"go.goroot": "", // Windows.
"gopls": {
"experimentalWorkspaceModule": true,
"usePlaceholders": true,
"completeUnimported": true,
// If true, enable additional analyses with staticcheck.
// Warning: This will significantly increase memory usage.
"staticcheck": false,
},
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
// Optional: Disable snippets, as they conflict with completion ranking.
"editor.snippetSuggestions": "none",
},
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
},
"go.toolsManagement.autoUpdate": true,
// "go.languageServerFlags": [
// "-rpc.trace"
// ]
//
// ToDo Tree.
//
"todo-tree.tree.buttons.scanMode": true,
"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|^\\s*(-|\\d+.))\\s*($TAGS)",
"todo-tree.general.tags": [
"BUG",
"HACK",
"FIXME",
"TODO",
"XXX",
"[ ]",
"[x]"
],
//
// Misc.
//
"redhat.telemetry.enabled": false,
"json-to-go.inlineTypeDefinitions": true,
}
{
"Mithril Closure": {
"prefix": "mithril-closure",
"body": "import m from 'mithril';\r\n\r\nexport const $1: m.ClosureComponent = () => {\r\n return {\r\n view: () => $2m('div', 'Context'),\r\n };\r\n};\r\n",
"description": "Creates a closure component in Mithril.",
},
"Mithril Storybook": {
"prefix": "mithril-storybook",
"body": "import m from 'mithril';\r\nimport { $1 } from '@\/component\/$2';\r\n\r\nexport default {\r\n title: 'Component\/$3',\r\n component: $1,\r\n};\r\n\r\nexport const $4: m.ClosureComponent = () => ({\r\n view: () => m($1),\r\n});\r\n",
"description": "Creates a storybook component in Mithril.",
},
"Arrow Function": {
"prefix": "arrow",
"body": "($1) => { $2 }",
"description": "Creates an arrow function."
},
"On Click": {
"prefix": "onclick",
"body": "onclick: ($1) => { $2 }",
"description": "Creates an onclick with an arrow function."
},
"Log to Console": {
"prefix": "log",
"body": "console.log($1)",
"description": "Creates a console.log() statement."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment