From 023097fc28565e3e9fe92ece6f1a631464853a67 Mon Sep 17 00:00:00 2001 From: Ryan Koval Date: Fri, 18 Oct 2024 15:57:48 -0500 Subject: [PATCH] added snippets to vscode --- link.sh | 7 +- sublime/.gitignore | 1 + sublime/convert-snippets.sh | 15 + sublime/package-lock.json | 601 ++++++++++++++++++ sublime/package.json | 6 + sublime/snippets/js/aarrfunc.sublime-snippet | 10 + sublime/snippets/js/afunc.sublime-snippet | 10 + sublime/snippets/js/aofunc.sublime-snippet | 10 + sublime/snippets/js/arrayfrom.sublime-snippet | 10 + sublime/snippets/js/arrfunc.sublime-snippet | 10 + sublime/snippets/js/asd.sublime-snippet | 9 + sublime/snippets/js/asdse.sublime-snippet | 9 + sublime/snippets/js/ase.sublime-snippet | 9 + sublime/snippets/js/asm.sublime-snippet | 10 + sublime/snippets/js/ast.sublime-snippet | 9 + sublime/snippets/js/astarray.sublime-snippet | 8 + .../snippets/js/astfunction.sublime-snippet | 9 + sublime/snippets/js/astnumber.sublime-snippet | 9 + sublime/snippets/js/aststring.sublime-snippet | 10 + .../snippets/js/constructor.sublime-snippet | 11 + sublime/snippets/js/dbtx.sublime-snippet | 12 + sublime/snippets/js/debugger.sublime-snippet | 9 + sublime/snippets/js/eafunc.sublime-snippet | 10 + sublime/snippets/js/edefault.sublime-snippet | 8 + sublime/snippets/js/edfunc.sublime-snippet | 10 + sublime/snippets/js/efunc.sublime-snippet | 10 + sublime/snippets/js/else.sublime-snippet | 10 + sublime/snippets/js/elseif.sublime-snippet | 10 + sublime/snippets/js/errlogger.sublime-snippet | 7 + .../js/eslint-disable.sublime-snippet | 9 + sublime/snippets/js/filter.sublime-snippet | 14 + sublime/snippets/js/find.sublime-snippet | 15 + sublime/snippets/js/fn.sublime-snippet | 7 + sublime/snippets/js/foreach.sublime-snippet | 14 + sublime/snippets/js/forin.sublime-snippet | 10 + sublime/snippets/js/forloop.sublime-snippet | 11 + sublime/snippets/js/forof.sublime-snippet | 10 + sublime/snippets/js/func.sublime-snippet | 10 + sublime/snippets/js/idx.sublime-snippet | 8 + sublime/snippets/js/if.sublime-snippet | 10 + sublime/snippets/js/iife.sublime-snippet | 10 + .../snippets/js/insertMulti.sublime-snippet | 12 + .../snippets/js/jsonstringify.sublime-snippet | 8 + sublime/snippets/js/log.sublime-snippet | 13 + sublime/snippets/js/logger.sublime-snippet | 15 + sublime/snippets/js/main.sublime-snippet | 13 + sublime/snippets/js/map.sublime-snippet | 15 + sublime/snippets/js/mapprop.sublime-snippet | 12 + sublime/snippets/js/nc.sublime-snippet | 14 + .../snippets/js/newpromise.sublime-snippet | 11 + sublime/snippets/js/nocom.sublime-snippet | 8 + sublime/snippets/js/nsc.sublime-snippet | 10 + sublime/snippets/js/obje.sublime-snippet | 8 + sublime/snippets/js/objk.sublime-snippet | 8 + sublime/snippets/js/objv.sublime-snippet | 8 + sublime/snippets/js/odes.sublime-snippet | 9 + sublime/snippets/js/ofunc.sublime-snippet | 10 + .../js/propPassThrough.sublime-snippet | 8 + sublime/snippets/js/redlong.sublime-snippet | 11 + sublime/snippets/js/require.sublime-snippet | 8 + sublime/snippets/js/ret.sublime-snippet | 8 + .../snippets/js/setinterval.sublime-snippet | 10 + .../snippets/js/settimeout.sublime-snippet | 10 + sublime/snippets/js/shebang.sublime-snippet | 9 + sublime/snippets/js/some.sublime-snippet | 9 + sublime/snippets/js/try.sublime-snippet | 11 + sublime/snippets/js/tt.sublime-snippet | 8 + .../snippets/js/utilinspect.sublime-snippet | 8 + sublime/snippets/js/while.sublime-snippet | 10 + sublime/snippets/jsx/div.sublime-snippet | 10 + sublime/snippets/jsx/frag.sublime-snippet | 10 + sublime/snippets/jsx/span.sublime-snippet | 10 + .../react-hooks/usecallback.sublime-snippet | 8 + .../react-hooks/useeffect.sublime-snippet | 11 + .../react-hooks/usememo.sublime-snippet | 8 + .../react-hooks/usercontext.sublime-snippet | 8 + .../react-hooks/usestate.sublime-snippet | 7 + sublime/snippets/sh/black.sublime-snippet | 8 + sublime/snippets/sh/blue.sublime-snippet | 8 + sublime/snippets/sh/brown.sublime-snippet | 8 + sublime/snippets/sh/cdgitroot.sublime-snippet | 8 + sublime/snippets/sh/cyan.sublime-snippet | 8 + sublime/snippets/sh/gray.sublime-snippet | 8 + sublime/snippets/sh/green.sublime-snippet | 8 + .../snippets/sh/light_blue.sublime-snippet | 8 + .../snippets/sh/light_cyan.sublime-snippet | 8 + .../snippets/sh/light_gray.sublime-snippet | 8 + .../snippets/sh/light_green.sublime-snippet | 8 + .../snippets/sh/light_purple.sublime-snippet | 8 + sublime/snippets/sh/light_red.sublime-snippet | 8 + sublime/snippets/sh/purple.sublime-snippet | 8 + sublime/snippets/sh/red.sublime-snippet | 8 + .../snippets/sh/resetcolor.sublime-snippet | 8 + sublime/snippets/sh/shebang.sublime-snippet | 9 + sublime/snippets/sh/yellow.sublime-snippet | 8 + sublime/snippets/ts/nnull.sublime-snippet | 8 + sublime/snippets/tsx/dummy.sublime-snippet | 8 + .../.gitignore | 0 .../{rkoval => rkoval.rkoval-0.0.1}/.nvmrc | 0 .../.vscode-test.mjs | 0 .../.vscodeignore | 0 .../CHANGELOG.md | 0 .../eslint.config.mjs | 0 .../install-into-vscode.sh | 0 .../package-lock.json | 0 .../package.json | 37 +- .../prettier.config.js | 0 .../snippets/js.code-snippets | 386 +++++++++++ .../snippets/jsx.code-snippets | 20 + .../snippets/react-hooks.code-snippets | 32 + .../snippets/sh.code-snippets | 110 ++++ .../snippets/ts.code-snippets | 8 + .../snippets/tsx.code-snippets | 8 + .../src/commands/openFileFromCursor.ts | 23 + .../src/commands/registerCommands.ts | 2 +- .../rkoval.rkoval-0.0.1/src/extension.ts | 10 + .../tsconfig.json | 0 vscode/extension/rkoval/README.md | 71 --- .../rkoval/src/commands/openFileFromCursor.ts | 49 -- vscode/extension/rkoval/src/extension.ts | 16 - .../rkoval/vsc-extension-quickstart.md | 44 -- 121 files changed, 2135 insertions(+), 185 deletions(-) create mode 100644 sublime/.gitignore create mode 100755 sublime/convert-snippets.sh create mode 100644 sublime/package-lock.json create mode 100644 sublime/package.json create mode 100644 sublime/snippets/js/aarrfunc.sublime-snippet create mode 100644 sublime/snippets/js/afunc.sublime-snippet create mode 100644 sublime/snippets/js/aofunc.sublime-snippet create mode 100644 sublime/snippets/js/arrayfrom.sublime-snippet create mode 100644 sublime/snippets/js/arrfunc.sublime-snippet create mode 100644 sublime/snippets/js/asd.sublime-snippet create mode 100644 sublime/snippets/js/asdse.sublime-snippet create mode 100644 sublime/snippets/js/ase.sublime-snippet create mode 100644 sublime/snippets/js/asm.sublime-snippet create mode 100644 sublime/snippets/js/ast.sublime-snippet create mode 100644 sublime/snippets/js/astarray.sublime-snippet create mode 100644 sublime/snippets/js/astfunction.sublime-snippet create mode 100644 sublime/snippets/js/astnumber.sublime-snippet create mode 100644 sublime/snippets/js/aststring.sublime-snippet create mode 100644 sublime/snippets/js/constructor.sublime-snippet create mode 100644 sublime/snippets/js/dbtx.sublime-snippet create mode 100644 sublime/snippets/js/debugger.sublime-snippet create mode 100644 sublime/snippets/js/eafunc.sublime-snippet create mode 100644 sublime/snippets/js/edefault.sublime-snippet create mode 100644 sublime/snippets/js/edfunc.sublime-snippet create mode 100644 sublime/snippets/js/efunc.sublime-snippet create mode 100644 sublime/snippets/js/else.sublime-snippet create mode 100644 sublime/snippets/js/elseif.sublime-snippet create mode 100644 sublime/snippets/js/errlogger.sublime-snippet create mode 100644 sublime/snippets/js/eslint-disable.sublime-snippet create mode 100644 sublime/snippets/js/filter.sublime-snippet create mode 100644 sublime/snippets/js/find.sublime-snippet create mode 100644 sublime/snippets/js/fn.sublime-snippet create mode 100644 sublime/snippets/js/foreach.sublime-snippet create mode 100644 sublime/snippets/js/forin.sublime-snippet create mode 100644 sublime/snippets/js/forloop.sublime-snippet create mode 100644 sublime/snippets/js/forof.sublime-snippet create mode 100644 sublime/snippets/js/func.sublime-snippet create mode 100644 sublime/snippets/js/idx.sublime-snippet create mode 100644 sublime/snippets/js/if.sublime-snippet create mode 100644 sublime/snippets/js/iife.sublime-snippet create mode 100644 sublime/snippets/js/insertMulti.sublime-snippet create mode 100644 sublime/snippets/js/jsonstringify.sublime-snippet create mode 100644 sublime/snippets/js/log.sublime-snippet create mode 100644 sublime/snippets/js/logger.sublime-snippet create mode 100644 sublime/snippets/js/main.sublime-snippet create mode 100644 sublime/snippets/js/map.sublime-snippet create mode 100644 sublime/snippets/js/mapprop.sublime-snippet create mode 100644 sublime/snippets/js/nc.sublime-snippet create mode 100644 sublime/snippets/js/newpromise.sublime-snippet create mode 100644 sublime/snippets/js/nocom.sublime-snippet create mode 100644 sublime/snippets/js/nsc.sublime-snippet create mode 100644 sublime/snippets/js/obje.sublime-snippet create mode 100644 sublime/snippets/js/objk.sublime-snippet create mode 100644 sublime/snippets/js/objv.sublime-snippet create mode 100644 sublime/snippets/js/odes.sublime-snippet create mode 100644 sublime/snippets/js/ofunc.sublime-snippet create mode 100644 sublime/snippets/js/propPassThrough.sublime-snippet create mode 100644 sublime/snippets/js/redlong.sublime-snippet create mode 100644 sublime/snippets/js/require.sublime-snippet create mode 100644 sublime/snippets/js/ret.sublime-snippet create mode 100644 sublime/snippets/js/setinterval.sublime-snippet create mode 100644 sublime/snippets/js/settimeout.sublime-snippet create mode 100644 sublime/snippets/js/shebang.sublime-snippet create mode 100644 sublime/snippets/js/some.sublime-snippet create mode 100644 sublime/snippets/js/try.sublime-snippet create mode 100644 sublime/snippets/js/tt.sublime-snippet create mode 100644 sublime/snippets/js/utilinspect.sublime-snippet create mode 100644 sublime/snippets/js/while.sublime-snippet create mode 100644 sublime/snippets/jsx/div.sublime-snippet create mode 100644 sublime/snippets/jsx/frag.sublime-snippet create mode 100644 sublime/snippets/jsx/span.sublime-snippet create mode 100644 sublime/snippets/react-hooks/usecallback.sublime-snippet create mode 100644 sublime/snippets/react-hooks/useeffect.sublime-snippet create mode 100644 sublime/snippets/react-hooks/usememo.sublime-snippet create mode 100644 sublime/snippets/react-hooks/usercontext.sublime-snippet create mode 100644 sublime/snippets/react-hooks/usestate.sublime-snippet create mode 100644 sublime/snippets/sh/black.sublime-snippet create mode 100644 sublime/snippets/sh/blue.sublime-snippet create mode 100644 sublime/snippets/sh/brown.sublime-snippet create mode 100644 sublime/snippets/sh/cdgitroot.sublime-snippet create mode 100644 sublime/snippets/sh/cyan.sublime-snippet create mode 100644 sublime/snippets/sh/gray.sublime-snippet create mode 100644 sublime/snippets/sh/green.sublime-snippet create mode 100644 sublime/snippets/sh/light_blue.sublime-snippet create mode 100644 sublime/snippets/sh/light_cyan.sublime-snippet create mode 100644 sublime/snippets/sh/light_gray.sublime-snippet create mode 100644 sublime/snippets/sh/light_green.sublime-snippet create mode 100644 sublime/snippets/sh/light_purple.sublime-snippet create mode 100644 sublime/snippets/sh/light_red.sublime-snippet create mode 100644 sublime/snippets/sh/purple.sublime-snippet create mode 100644 sublime/snippets/sh/red.sublime-snippet create mode 100644 sublime/snippets/sh/resetcolor.sublime-snippet create mode 100644 sublime/snippets/sh/shebang.sublime-snippet create mode 100644 sublime/snippets/sh/yellow.sublime-snippet create mode 100644 sublime/snippets/ts/nnull.sublime-snippet create mode 100644 sublime/snippets/tsx/dummy.sublime-snippet rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/.gitignore (100%) rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/.nvmrc (100%) rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/.vscode-test.mjs (100%) rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/.vscodeignore (100%) rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/CHANGELOG.md (100%) rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/eslint.config.mjs (100%) rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/install-into-vscode.sh (100%) mode change 100644 => 100755 rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/package-lock.json (100%) rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/package.json (52%) rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/prettier.config.js (100%) create mode 100644 vscode/extension/rkoval.rkoval-0.0.1/snippets/js.code-snippets create mode 100644 vscode/extension/rkoval.rkoval-0.0.1/snippets/jsx.code-snippets create mode 100644 vscode/extension/rkoval.rkoval-0.0.1/snippets/react-hooks.code-snippets create mode 100644 vscode/extension/rkoval.rkoval-0.0.1/snippets/sh.code-snippets create mode 100644 vscode/extension/rkoval.rkoval-0.0.1/snippets/ts.code-snippets create mode 100644 vscode/extension/rkoval.rkoval-0.0.1/snippets/tsx.code-snippets create mode 100644 vscode/extension/rkoval.rkoval-0.0.1/src/commands/openFileFromCursor.ts rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/src/commands/registerCommands.ts (72%) create mode 100644 vscode/extension/rkoval.rkoval-0.0.1/src/extension.ts rename vscode/extension/{rkoval => rkoval.rkoval-0.0.1}/tsconfig.json (100%) delete mode 100644 vscode/extension/rkoval/README.md delete mode 100644 vscode/extension/rkoval/src/commands/openFileFromCursor.ts delete mode 100644 vscode/extension/rkoval/src/extension.ts delete mode 100644 vscode/extension/rkoval/vsc-extension-quickstart.md diff --git a/link.sh b/link.sh index 8631b3a..3112868 100755 --- a/link.sh +++ b/link.sh @@ -24,5 +24,8 @@ ln -sFv "$SCRIPT_DIR/link/.config/direnv" ~/.config ln -sFv "$SCRIPT_DIR/nvim" ~/.config ln -sFv "$SCRIPT_DIR/submodules/packer.nvim" "$NVIM_PLUGINS_DIRECTORY" ln -sFv "$SCRIPT_DIR/prompt_rkoval_setup" ~/.zgen/sorin-ionescu/prezto-master/modules/prompt/functions -ln -sFv "$SCRIPT_DIR/vscode/extension/rkoval" ~/.cursor/extensions/rkoval -ln -sFv "$SCRIPT_DIR/vscode/extension/rkoval" ~/.vscode/extensions/rkoval + +mkdir -p ~/.cursor/extensions +mkdir -p ~/.vscode/extensions +ln -sFv "$SCRIPT_DIR/vscode/extension/rkoval.rkoval-0.0.1" ~/.cursor/extensions +ln -sFv "$SCRIPT_DIR/vscode/extension/rkoval.rkoval-0.0.1" ~/.vscode/extensions diff --git a/sublime/.gitignore b/sublime/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/sublime/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/sublime/convert-snippets.sh b/sublime/convert-snippets.sh new file mode 100755 index 0000000..7c69b52 --- /dev/null +++ b/sublime/convert-snippets.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -e +npm install + +for dir in ./snippets/*/; do + if [ -d "$dir" ]; then + dirname=$(basename "$dir") + echo "Processing directory: $dirname" + ./node_modules/.bin/snippetToVsCode -s "$dir" -o "../vscode/extension/rkoval/snippets/$dirname.code-snippets" + # Remove leading and trailing newline characters from the 'body' key using jq + jq 'map_values(.body |= if type == "array" then map(sub("^\n"; "") | sub("\n$"; "")) else sub("^\n"; "") | sub("\n$"; "") end)' "../vscode/extension/rkoval/snippets/$dirname.code-snippets" > temp.json && mv temp.json "../vscode/extension/rkoval/snippets/$dirname.code-snippets" + + prettier --write "../vscode/extension/rkoval/snippets/$dirname.code-snippets" + fi +done \ No newline at end of file diff --git a/sublime/package-lock.json b/sublime/package-lock.json new file mode 100644 index 0000000..2a94357 --- /dev/null +++ b/sublime/package-lock.json @@ -0,0 +1,601 @@ +{ + "name": "sublime", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "convert-snippets-to-vscode": "^1.0.2", + "prettier": "^3.3.3" + } + }, + "node_modules/ansi-escape-sequences": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-2.2.2.tgz", + "integrity": "sha512-8UeLcAdY7X4ZUBiuWoxqHfPGIUwJ5Vz7ujKdMUWbR0DwiBziHJbEMYzTvt7OQNtFb2NHxSxa3COicuPNgvE0XQ==", + "dev": true, + "dependencies": { + "array-back": "^1.0.2", + "collect-all": "~0.2.1" + }, + "bin": { + "ansi": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha512-wiXutNjDUlNEDWHcYH3jtZUhd3c4/VojassD8zHdHCY13xbZy2XbW+NKQwA0tWGBVzDA9qEzYwfoSsWmviidhw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha512-1WxbZvrmyhkNoeYcizokbmh5oiOCIfyvGtcqbK3Ls1v1fKcquzxnQSceOx6tzq7jmai2kFLWIpGND2cLhH6TPw==", + "dev": true, + "dependencies": { + "typical": "^2.6.0" + }, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha512-25tABq090YNKkF6JH7lcwO0zFJTRke4Jcq9iX2nr/Sz0Cjjv4gckmwlW6Ty/aoyFd6z3ysR2hMGC2GFugmBo6A==", + "dev": true, + "dependencies": { + "restore-cursor": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collect-all": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/collect-all/-/collect-all-0.2.1.tgz", + "integrity": "sha512-DJM6+T8WAUEDVPxvbousmxRvtGW5+Q7JazRYmELEzn+BLGlRrqQ1ENKIpfiUjveCupWgUQd4iTvrMfDo0HiVKw==", + "dev": true, + "dependencies": { + "stream-connect": "^1.0.1", + "stream-via": "~0.1.0", + "typical": "^2.3.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collect-json": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/collect-json/-/collect-json-1.0.9.tgz", + "integrity": "sha512-5sGzu8rjhY4uzm4FJOVsNtcAhNiyEsZ70Lz3xv+7mXuLfU41QikE0es3nn2N0knqEKg+r4K7TMFHFmR8OFGpFA==", + "dev": true, + "dependencies": { + "collect-all": "^1.0.4", + "stream-connect": "^1.0.2", + "stream-via": "^1.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collect-json/node_modules/collect-all": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/collect-all/-/collect-all-1.0.4.tgz", + "integrity": "sha512-RKZhRwJtJEP5FWul+gkSMEnaK6H3AGPTTWOiRimCcs+rc/OmQE3Yhy1Q7A7KsdkG3ZXVdZq68Y6ONSdvkeEcKA==", + "dev": true, + "dependencies": { + "stream-connect": "^1.0.2", + "stream-via": "^1.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collect-json/node_modules/stream-via": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/stream-via/-/stream-via-1.0.4.tgz", + "integrity": "sha512-DBp0lSvX5G9KGRDTkR/R+a29H+Wk2xItOF+MpZLLNDWbEV9tGPnqLPxHEYjmiz8xGtJHRIqmI+hCjmNzqoA4nQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/column-layout": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/column-layout/-/column-layout-2.1.4.tgz", + "integrity": "sha512-u0d19HeRqHrs8nK+dBK5yzJ1fcMKXZmhXeKOVZfjbU2PJDMavQn256E262Z1qOD5Esg32dq17cM2pYUnO1WVTw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "dependencies": { + "ansi-escape-sequences": "^2.2.2", + "array-back": "^1.0.3", + "collect-json": "^1.0.8", + "command-line-args": "^2.1.6", + "core-js": "^2.4.0", + "deep-extend": "~0.4.1", + "feature-detect-es6": "^1.2.0", + "object-tools": "^2.0.6", + "typical": "^2.4.2", + "wordwrapjs": "^1.2.0" + }, + "bin": { + "column-layout": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/command-line-args": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-2.1.6.tgz", + "integrity": "sha512-qo+q+AcV8vRQCVDCoh3gNbUiVI86ywoKkIUJeNCNZBCw1qv111Dp0F3nZ2PR/92HrGsgsABuAAi7Fe/z/cj8YQ==", + "dev": true, + "dependencies": { + "array-back": "^1.0.2", + "command-line-usage": "^2", + "core-js": "^2.0.1", + "feature-detect-es6": "^1.2.0", + "find-replace": "^1", + "typical": "^2.3.0" + }, + "bin": { + "command-line-args": "bin/cli.js" + } + }, + "node_modules/command-line-usage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-2.0.5.tgz", + "integrity": "sha512-xxUZrDySMWQknZRlCKXbuSCR8PUQXLbypmXPv8a1ZaxIGE5SSynjXNZzig8VTcTcXuvIVf9y563nucsRAYnCKA==", + "dev": true, + "dependencies": { + "ansi-escape-sequences": "^2.2.2", + "array-back": "^1.0.3", + "column-layout": "^2.1.1", + "feature-detect-es6": "^1.2.0", + "typical": "^2.4.2", + "wordwrapjs": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/convert-snippets-to-vscode": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/convert-snippets-to-vscode/-/convert-snippets-to-vscode-1.0.2.tgz", + "integrity": "sha512-mup24Y2tPfmexTwZ99fyALl2iq3FGDRAmRlCX7kmjKlfIXB/wcvppuiX1N5bL6rW+GCAuqQoCKcENoxjY5pelg==", + "dev": true, + "dependencies": { + "command-line-args": "^2.1.6", + "inquirer": "^0.12.0", + "sax": "^1.1.3" + }, + "bin": { + "snippetToVsCode": "index.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "dev": true, + "hasInstallScript": true + }, + "node_modules/deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha512-cQ0iXSEKi3JRNhjUsLWvQ+MVPxLVqpwCd0cFsWbJxlCim2TlCo1JvN5WaPdPvSpUdEnkJ/X+mPGcq5RJ68EK8g==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.12.0" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha512-MsG3prOVw1WtLXAZbM3KiYtooKR1LvxHh3VHsVtIy0uiUu8usxgB/94DP2HxtD/661lLdB6yzQ09lGJSQr6nkg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/feature-detect-es6": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/feature-detect-es6/-/feature-detect-es6-1.5.0.tgz", + "integrity": "sha512-DzWPIGzTnfp3/KK1d/YPfmgLqeDju9F2DQYBL35VusgSApcA7XGqVtXfR4ETOOFEzdFJ3J7zh0Gkk011TiA4uQ==", + "dev": true, + "dependencies": { + "array-back": "^1.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/find-replace": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-1.0.3.tgz", + "integrity": "sha512-KrUnjzDCD9426YnCP56zGYy/eieTnhtK6Vn++j+JJzmlsWWwEkDnsyVF575spT6HJ6Ow9tlbT3TQTDsa+O4UWA==", + "dev": true, + "dependencies": { + "array-back": "^1.0.4", + "test-value": "^2.1.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha512-bOetEz5+/WpgaW4D1NYOk1aD+JCqRjqu/FwRFgnIfiP7FC/zinsrfyO1vlS3nyH/R7S0IH3BIHBu4DBIDSqiGQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^1.1.0", + "ansi-regex": "^2.0.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "readline2": "^1.0.1", + "run-async": "^0.1.0", + "rx-lite": "^3.1.2", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dev": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha512-EbrziT4s8cWPmzr47eYVW3wimS4HsvlnV5ri1xw1aR6JQo/OrJX5rkl32K/QQHdxeabJETtfeaROGhd8W7uBgg==", + "dev": true + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-get": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-get/-/object-get-2.1.1.tgz", + "integrity": "sha512-7n4IpLMzGGcLEMiQKsNR7vCe+N5E9LORFrtNUVy4sO3dj9a3HedZCxEL2T7QuLhcHN1NBuBsMOKaOsAYI9IIvg==", + "dev": true + }, + "node_modules/object-tools": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/object-tools/-/object-tools-2.0.6.tgz", + "integrity": "sha512-Su3j153hgK9Dgd07FTi6y6DJmJtyWxyuoWvl5VZLI6HVL9VQ81ShfT9c2l/eNIZY85axAi0t1AqFjCAATGab0g==", + "dev": true, + "dependencies": { + "array-back": "^1.0.2", + "collect-json": "^1.0.7", + "object-get": "^2.0.2", + "test-value": "^1.1.0", + "typical": "^2.4.2" + }, + "bin": { + "object-tools": "bin/cli.js" + } + }, + "node_modules/object-tools/node_modules/test-value": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-1.1.0.tgz", + "integrity": "sha512-wrsbRo7qP+2Je8x8DsK8ovCGyxe3sYfQwOraIY/09A2gFXU9DYKiTF14W4ki/01AEh56kMzAmlj9CaHGDDUBJA==", + "dev": true, + "dependencies": { + "array-back": "^1.0.2", + "typical": "^2.4.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha512-GZ+g4jayMqzCRMgB2sol7GiCLjKfS1PINkjmx8spcKce1LiVqcbQreXwqs2YAFXC6R03VIG28ZS31t8M866v6A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha512-8/td4MmwUB6PkZUbV25uKz7dfrmjYWxsW8DVfibWdlHRk/l/DfHKn4pU+dfcoGLFgWOdyGCzINRQD7jn+Bv+/g==", + "dev": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "mute-stream": "0.0.5" + } + }, + "node_modules/restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha512-reSjH4HuiFlxlaBaFCiS6O76ZGG2ygKoSlCsipKdaZuKSPx/+bt9mULkn4l0asVzbEfQQmXRg6Wp6gv6m0wElw==", + "dev": true, + "dependencies": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha512-qOX+w+IxFgpUpJfkv2oGN0+ExPs68F4sZHfaRRx4dDexAQkG83atugKVEylyT5ARees3HBbfmuvnjbrd8j9Wjw==", + "dev": true, + "dependencies": { + "once": "^1.3.0" + } + }, + "node_modules/rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha512-1I1+G2gteLB8Tkt8YI1sJvSIfa0lWuRtC8GjvtyPBcLSF5jBCCJJqKrpER5JU5r6Bhe+i9/pK3VMuUcXu0kdwQ==", + "dev": true + }, + "node_modules/sax": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", + "dev": true + }, + "node_modules/stream-connect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-connect/-/stream-connect-1.0.2.tgz", + "integrity": "sha512-68Kl+79cE0RGKemKkhxTSg8+6AGrqBt+cbZAXevg2iJ6Y3zX4JhA/sZeGzLpxW9cXhmqAcE7KnJCisUmIUfnFQ==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "dependencies": { + "array-back": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stream-via": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/stream-via/-/stream-via-0.1.1.tgz", + "integrity": "sha512-1U7icavM/2dRDSevxnJRZfKBWrnhmtdCh0zQTThwYchL2YWjbwZb2PEngEj9HKjgyJ2oDipz6TLud/AU6BAIzQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dev": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/test-value": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", + "integrity": "sha512-+1epbAxtKeXttkGFMTX9H42oqzOTufR1ceCF+GYA5aOmvaPq9wd4PUS8329fn2RRLGNeUkgRLnVpycjx8DsO2w==", + "dev": true, + "dependencies": { + "array-back": "^1.0.3", + "typical": "^2.6.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/typical": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", + "integrity": "sha512-ofhi8kjIje6npGozTip9Fr8iecmYfEbS06i0JnIg+rh51KakryWF4+jX8lLKZVhy6N+ID45WYSFCxPOdTWCzNg==", + "dev": true + }, + "node_modules/wordwrapjs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-1.2.1.tgz", + "integrity": "sha512-oHt3LHdyJ2xke7aFYuXXB4QBvfORPZAfwdOW5bKQhCNj2Fa+I/WBz81yle19Cs7gZvaBxoYKOuPW/mFe4X09lg==", + "dev": true, + "dependencies": { + "array-back": "^1.0.3", + "typical": "^2.5.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + } + } +} diff --git a/sublime/package.json b/sublime/package.json new file mode 100644 index 0000000..d74bfc5 --- /dev/null +++ b/sublime/package.json @@ -0,0 +1,6 @@ +{ + "devDependencies": { + "convert-snippets-to-vscode": "^1.0.2", + "prettier": "^3.3.3" + } +} diff --git a/sublime/snippets/js/aarrfunc.sublime-snippet b/sublime/snippets/js/aarrfunc.sublime-snippet new file mode 100644 index 0000000..7d0d234 --- /dev/null +++ b/sublime/snippets/js/aarrfunc.sublime-snippet @@ -0,0 +1,10 @@ + + { + $0 +}, +]]> + aarrfunc + source.js, source.ts, source.jsx, source.tsx + Snippet: async arrow function + diff --git a/sublime/snippets/js/afunc.sublime-snippet b/sublime/snippets/js/afunc.sublime-snippet new file mode 100644 index 0000000..52ff0b0 --- /dev/null +++ b/sublime/snippets/js/afunc.sublime-snippet @@ -0,0 +1,10 @@ + + + afunc + source.js, source.ts, source.jsx, source.tsx + Snippet: async function + diff --git a/sublime/snippets/js/aofunc.sublime-snippet b/sublime/snippets/js/aofunc.sublime-snippet new file mode 100644 index 0000000..522dcb1 --- /dev/null +++ b/sublime/snippets/js/aofunc.sublime-snippet @@ -0,0 +1,10 @@ + + + aofunc + source.js, source.ts, source.jsx, source.tsx + Snippet: async object function + diff --git a/sublime/snippets/js/arrayfrom.sublime-snippet b/sublime/snippets/js/arrayfrom.sublime-snippet new file mode 100644 index 0000000..c089b91 --- /dev/null +++ b/sublime/snippets/js/arrayfrom.sublime-snippet @@ -0,0 +1,10 @@ + + { + return $0 +}); +]]> + arrayfrom + source.js, source.ts, source.jsx, source.tsx + Snippet: Array.from + diff --git a/sublime/snippets/js/arrfunc.sublime-snippet b/sublime/snippets/js/arrfunc.sublime-snippet new file mode 100644 index 0000000..3e871c5 --- /dev/null +++ b/sublime/snippets/js/arrfunc.sublime-snippet @@ -0,0 +1,10 @@ + + { + $0 +} +]]> + arrfunc + source.js, source.ts, source.jsx, source.tsx + Snippet: arrow function + diff --git a/sublime/snippets/js/asd.sublime-snippet b/sublime/snippets/js/asd.sublime-snippet new file mode 100644 index 0000000..b3ff881 --- /dev/null +++ b/sublime/snippets/js/asd.sublime-snippet @@ -0,0 +1,9 @@ + + + + asd + Snippet: Insert assert deep strict equal + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/asdse.sublime-snippet b/sublime/snippets/js/asdse.sublime-snippet new file mode 100644 index 0000000..8082030 --- /dev/null +++ b/sublime/snippets/js/asdse.sublime-snippet @@ -0,0 +1,9 @@ + + + + asdse + Snippet: Insert assert + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/ase.sublime-snippet b/sublime/snippets/js/ase.sublime-snippet new file mode 100644 index 0000000..769b2a2 --- /dev/null +++ b/sublime/snippets/js/ase.sublime-snippet @@ -0,0 +1,9 @@ + + + + ase + Snippet: Insert assert strict equal + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/asm.sublime-snippet b/sublime/snippets/js/asm.sublime-snippet new file mode 100644 index 0000000..ad96733 --- /dev/null +++ b/sublime/snippets/js/asm.sublime-snippet @@ -0,0 +1,10 @@ + + + asm + source.js, source.ts, source.jsx, source.tsx + Snippet: async static method + diff --git a/sublime/snippets/js/ast.sublime-snippet b/sublime/snippets/js/ast.sublime-snippet new file mode 100644 index 0000000..834dd4b --- /dev/null +++ b/sublime/snippets/js/ast.sublime-snippet @@ -0,0 +1,9 @@ + + + + ast + Snippet: Insert assert + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/astarray.sublime-snippet b/sublime/snippets/js/astarray.sublime-snippet new file mode 100644 index 0000000..2fbcce4 --- /dev/null +++ b/sublime/snippets/js/astarray.sublime-snippet @@ -0,0 +1,8 @@ + + + astarray + Snippet: Insert assert for type array + source.js, source.ts, source.jsx, source.tsx + \ No newline at end of file diff --git a/sublime/snippets/js/astfunction.sublime-snippet b/sublime/snippets/js/astfunction.sublime-snippet new file mode 100644 index 0000000..bf029f4 --- /dev/null +++ b/sublime/snippets/js/astfunction.sublime-snippet @@ -0,0 +1,9 @@ + + + + astfunction + Snippet: Insert assert for type function + source.js, source.ts, source.jsx, source.tsx + \ No newline at end of file diff --git a/sublime/snippets/js/astnumber.sublime-snippet b/sublime/snippets/js/astnumber.sublime-snippet new file mode 100644 index 0000000..f67f6a1 --- /dev/null +++ b/sublime/snippets/js/astnumber.sublime-snippet @@ -0,0 +1,9 @@ + + + + astnumber + Snippet: Insert assert for type number + source.js, source.ts, source.jsx, source.tsx + \ No newline at end of file diff --git a/sublime/snippets/js/aststring.sublime-snippet b/sublime/snippets/js/aststring.sublime-snippet new file mode 100644 index 0000000..2fb9fc7 --- /dev/null +++ b/sublime/snippets/js/aststring.sublime-snippet @@ -0,0 +1,10 @@ + + 0, `${3:${1:paramName} must not be empty}`); +]]> + + aststring + Snippet: Insert assert for type string + source.js, source.ts, source.jsx, source.tsx + \ No newline at end of file diff --git a/sublime/snippets/js/constructor.sublime-snippet b/sublime/snippets/js/constructor.sublime-snippet new file mode 100644 index 0000000..fc6ab0c --- /dev/null +++ b/sublime/snippets/js/constructor.sublime-snippet @@ -0,0 +1,11 @@ + + + constructor + source.js, source.ts, source.jsx, source.tsx + Snippet: insert a constructor + diff --git a/sublime/snippets/js/dbtx.sublime-snippet b/sublime/snippets/js/dbtx.sublime-snippet new file mode 100644 index 0000000..58abf4e --- /dev/null +++ b/sublime/snippets/js/dbtx.sublime-snippet @@ -0,0 +1,12 @@ + + { + return t.batch([ + ${1:// something} + ]): +}); +]]> + dbtx + Snippet: db.tx() + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/debugger.sublime-snippet b/sublime/snippets/js/debugger.sublime-snippet new file mode 100644 index 0000000..f768b65 --- /dev/null +++ b/sublime/snippets/js/debugger.sublime-snippet @@ -0,0 +1,9 @@ + + + debugger + source.js, source.ts, source.jsx, source.tsx + debugger statement with 'this' (that) context + diff --git a/sublime/snippets/js/eafunc.sublime-snippet b/sublime/snippets/js/eafunc.sublime-snippet new file mode 100644 index 0000000..c0aa15e --- /dev/null +++ b/sublime/snippets/js/eafunc.sublime-snippet @@ -0,0 +1,10 @@ + + + eafunc + source.js, source.ts, source.jsx, source.tsx + Snippet: export async function + diff --git a/sublime/snippets/js/edefault.sublime-snippet b/sublime/snippets/js/edefault.sublime-snippet new file mode 100644 index 0000000..a76897e --- /dev/null +++ b/sublime/snippets/js/edefault.sublime-snippet @@ -0,0 +1,8 @@ + + + edefault + source.js, source.ts, source.jsx, source.tsx + Snippet: export default + diff --git a/sublime/snippets/js/edfunc.sublime-snippet b/sublime/snippets/js/edfunc.sublime-snippet new file mode 100644 index 0000000..fddf383 --- /dev/null +++ b/sublime/snippets/js/edfunc.sublime-snippet @@ -0,0 +1,10 @@ + + + efunc + source.js, source.ts, source.jsx, source.tsx + Snippet: export function + diff --git a/sublime/snippets/js/efunc.sublime-snippet b/sublime/snippets/js/efunc.sublime-snippet new file mode 100644 index 0000000..f5c3454 --- /dev/null +++ b/sublime/snippets/js/efunc.sublime-snippet @@ -0,0 +1,10 @@ + + + efunc + source.js, source.ts, source.jsx, source.tsx + Snippet: export function + diff --git a/sublime/snippets/js/else.sublime-snippet b/sublime/snippets/js/else.sublime-snippet new file mode 100644 index 0000000..5d1f67e --- /dev/null +++ b/sublime/snippets/js/else.sublime-snippet @@ -0,0 +1,10 @@ + + + else + source.js, source.ts, source.jsx, source.tsx + Snippet: else + diff --git a/sublime/snippets/js/elseif.sublime-snippet b/sublime/snippets/js/elseif.sublime-snippet new file mode 100644 index 0000000..c146819 --- /dev/null +++ b/sublime/snippets/js/elseif.sublime-snippet @@ -0,0 +1,10 @@ + + + elseif + source.js, source.ts, source.jsx, source.tsx + Snippet: else if + diff --git a/sublime/snippets/js/errlogger.sublime-snippet b/sublime/snippets/js/errlogger.sublime-snippet new file mode 100644 index 0000000..ed5a0ec --- /dev/null +++ b/sublime/snippets/js/errlogger.sublime-snippet @@ -0,0 +1,7 @@ + + + errlogger + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/eslint-disable.sublime-snippet b/sublime/snippets/js/eslint-disable.sublime-snippet new file mode 100644 index 0000000..5ffb1d1 --- /dev/null +++ b/sublime/snippets/js/eslint-disable.sublime-snippet @@ -0,0 +1,9 @@ + + + eslint-disable + source.js, source.ts, source.jsx, source.tsx + Snippet: disables eslint rule + diff --git a/sublime/snippets/js/filter.sublime-snippet b/sublime/snippets/js/filter.sublime-snippet new file mode 100644 index 0000000..6906ed2 --- /dev/null +++ b/sublime/snippets/js/filter.sublime-snippet @@ -0,0 +1,14 @@ + + + + { + return ${2:condition}; +}) +]]> + filter + source.js, source.ts, source.jsx, source.tsx +Snippet: filter. inserts common `filter` function + diff --git a/sublime/snippets/js/find.sublime-snippet b/sublime/snippets/js/find.sublime-snippet new file mode 100644 index 0000000..8898341 --- /dev/null +++ b/sublime/snippets/js/find.sublime-snippet @@ -0,0 +1,15 @@ + + + + { + $0 + return ${2:trueOrFalse} +}) +]]> + find + source.js, source.ts, source.jsx, source.tsx +Snippet: find function + diff --git a/sublime/snippets/js/fn.sublime-snippet b/sublime/snippets/js/fn.sublime-snippet new file mode 100644 index 0000000..dcba66f --- /dev/null +++ b/sublime/snippets/js/fn.sublime-snippet @@ -0,0 +1,7 @@ + + + fn + Snippet: inserts filename without extensions + diff --git a/sublime/snippets/js/foreach.sublime-snippet b/sublime/snippets/js/foreach.sublime-snippet new file mode 100644 index 0000000..7d073d4 --- /dev/null +++ b/sublime/snippets/js/foreach.sublime-snippet @@ -0,0 +1,14 @@ + + + + { + $0 +}) +]]> + foreach + source.js, source.ts, source.jsx, source.tsx +Snippet: foreach. inserts common `foreach` function + diff --git a/sublime/snippets/js/forin.sublime-snippet b/sublime/snippets/js/forin.sublime-snippet new file mode 100644 index 0000000..f53a76e --- /dev/null +++ b/sublime/snippets/js/forin.sublime-snippet @@ -0,0 +1,10 @@ + + + forin + source.js, source.ts, source.jsx, source.tsx + Snippet: for...in object + diff --git a/sublime/snippets/js/forloop.sublime-snippet b/sublime/snippets/js/forloop.sublime-snippet new file mode 100644 index 0000000..4a69ba6 --- /dev/null +++ b/sublime/snippets/js/forloop.sublime-snippet @@ -0,0 +1,11 @@ + + + forloop + source.js, source.ts, source.jsx, source.tsx, source.ts, source.tsx + Snippet: forloop + diff --git a/sublime/snippets/js/forof.sublime-snippet b/sublime/snippets/js/forof.sublime-snippet new file mode 100644 index 0000000..914d1c4 --- /dev/null +++ b/sublime/snippets/js/forof.sublime-snippet @@ -0,0 +1,10 @@ + + + forof + source.js, source.ts, source.jsx, source.tsx + Snippet: for...of (array) + diff --git a/sublime/snippets/js/func.sublime-snippet b/sublime/snippets/js/func.sublime-snippet new file mode 100644 index 0000000..11e8259 --- /dev/null +++ b/sublime/snippets/js/func.sublime-snippet @@ -0,0 +1,10 @@ + + + func + source.js, source.ts, source.jsx, source.tsx + Snippet: function + diff --git a/sublime/snippets/js/idx.sublime-snippet b/sublime/snippets/js/idx.sublime-snippet new file mode 100644 index 0000000..70f6305 --- /dev/null +++ b/sublime/snippets/js/idx.sublime-snippet @@ -0,0 +1,8 @@ + + + idx + source.sql + Snippet: insert index; + diff --git a/sublime/snippets/js/if.sublime-snippet b/sublime/snippets/js/if.sublime-snippet new file mode 100644 index 0000000..e2b5d5d --- /dev/null +++ b/sublime/snippets/js/if.sublime-snippet @@ -0,0 +1,10 @@ + + + if + source.js, source.ts, source.jsx, source.tsx + Snippet: if + diff --git a/sublime/snippets/js/iife.sublime-snippet b/sublime/snippets/js/iife.sublime-snippet new file mode 100644 index 0000000..8ff1cd9 --- /dev/null +++ b/sublime/snippets/js/iife.sublime-snippet @@ -0,0 +1,10 @@ + + { + ${1:// code here} +})(); +]]> + iife + Snippet: inserts an iife + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/insertMulti.sublime-snippet b/sublime/snippets/js/insertMulti.sublime-snippet new file mode 100644 index 0000000..7afda0c --- /dev/null +++ b/sublime/snippets/js/insertMulti.sublime-snippet @@ -0,0 +1,12 @@ + + ({${2:data}})), + ['${3:columns}'], + '${4:table}' + ); +]]> + insertMulti + source.js, source.ts + Snippet: Creates a multi-insert database statement + diff --git a/sublime/snippets/js/jsonstringify.sublime-snippet b/sublime/snippets/js/jsonstringify.sublime-snippet new file mode 100644 index 0000000..cbe1e34 --- /dev/null +++ b/sublime/snippets/js/jsonstringify.sublime-snippet @@ -0,0 +1,8 @@ + + + jsonstringify + source.js, source.ts, source.jsx, source.tsx + Snippet: inserts `JSON.stringify(...)` + diff --git a/sublime/snippets/js/log.sublime-snippet b/sublime/snippets/js/log.sublime-snippet new file mode 100644 index 0000000..0462d55 --- /dev/null +++ b/sublime/snippets/js/log.sublime-snippet @@ -0,0 +1,13 @@ + + + + + + log + + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/logger.sublime-snippet b/sublime/snippets/js/logger.sublime-snippet new file mode 100644 index 0000000..59a2075 --- /dev/null +++ b/sublime/snippets/js/logger.sublime-snippet @@ -0,0 +1,15 @@ + + + + + + logger + + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/main.sublime-snippet b/sublime/snippets/js/main.sublime-snippet new file mode 100644 index 0000000..524f38d --- /dev/null +++ b/sublime/snippets/js/main.sublime-snippet @@ -0,0 +1,13 @@ + + { + process.exitCode = 1; + console.error(error); +}); +]]> + main + source.js, source.ts +Snippet: insert main function for a CLI tool + diff --git a/sublime/snippets/js/map.sublime-snippet b/sublime/snippets/js/map.sublime-snippet new file mode 100644 index 0000000..ca38fa8 --- /dev/null +++ b/sublime/snippets/js/map.sublime-snippet @@ -0,0 +1,15 @@ + + + + { + $0 + return ${2:mapped}; +}) +]]> + map + source.js, source.ts, source.jsx, source.tsx +Snippet: map. inserts common `map` function + diff --git a/sublime/snippets/js/mapprop.sublime-snippet b/sublime/snippets/js/mapprop.sublime-snippet new file mode 100644 index 0000000..e620436 --- /dev/null +++ b/sublime/snippets/js/mapprop.sublime-snippet @@ -0,0 +1,12 @@ + + + + ${1:prop})$0 +]]> + mapprop + source.js, source.ts, source.jsx, source.tsx +Snippet: map prop. inserts map function to extract a property + diff --git a/sublime/snippets/js/nc.sublime-snippet b/sublime/snippets/js/nc.sublime-snippet new file mode 100644 index 0000000..13a2ee0 --- /dev/null +++ b/sublime/snippets/js/nc.sublime-snippet @@ -0,0 +1,14 @@ + + + + nc + source.js, source.ts, source.jsx, source.tsx + Snippet: new class (non-component) + diff --git a/sublime/snippets/js/newpromise.sublime-snippet b/sublime/snippets/js/newpromise.sublime-snippet new file mode 100644 index 0000000..528d97d --- /dev/null +++ b/sublime/snippets/js/newpromise.sublime-snippet @@ -0,0 +1,11 @@ + + { + ${1:// do something} +}); +]]> + + newpromise + Snippet: new Promise + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/nocom.sublime-snippet b/sublime/snippets/js/nocom.sublime-snippet new file mode 100644 index 0000000..0fc177d --- /dev/null +++ b/sublime/snippets/js/nocom.sublime-snippet @@ -0,0 +1,8 @@ + + + nocom + source.js, source.ts, source.jsx, source.tsx, source.scss + Snippet: Inserts NOCOMMIT message + diff --git a/sublime/snippets/js/nsc.sublime-snippet b/sublime/snippets/js/nsc.sublime-snippet new file mode 100644 index 0000000..3fdbeca --- /dev/null +++ b/sublime/snippets/js/nsc.sublime-snippet @@ -0,0 +1,10 @@ + + + + nsc + source.js, source.ts, source.jsx, source.tsx + Snippet: new static class + diff --git a/sublime/snippets/js/obje.sublime-snippet b/sublime/snippets/js/obje.sublime-snippet new file mode 100644 index 0000000..1deac2c --- /dev/null +++ b/sublime/snippets/js/obje.sublime-snippet @@ -0,0 +1,8 @@ + + + obje + Snippet: Object.entries + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/objk.sublime-snippet b/sublime/snippets/js/objk.sublime-snippet new file mode 100644 index 0000000..6328732 --- /dev/null +++ b/sublime/snippets/js/objk.sublime-snippet @@ -0,0 +1,8 @@ + + + objk + Snippet: Object.keys + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/objv.sublime-snippet b/sublime/snippets/js/objv.sublime-snippet new file mode 100644 index 0000000..25180da --- /dev/null +++ b/sublime/snippets/js/objv.sublime-snippet @@ -0,0 +1,8 @@ + + + objv + Snippet: Object.values + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/odes.sublime-snippet b/sublime/snippets/js/odes.sublime-snippet new file mode 100644 index 0000000..7153798 --- /dev/null +++ b/sublime/snippets/js/odes.sublime-snippet @@ -0,0 +1,9 @@ + + + odes + source.js, source.ts, source.jsx, source.tsx +Snippet: object destructure + diff --git a/sublime/snippets/js/ofunc.sublime-snippet b/sublime/snippets/js/ofunc.sublime-snippet new file mode 100644 index 0000000..f184e31 --- /dev/null +++ b/sublime/snippets/js/ofunc.sublime-snippet @@ -0,0 +1,10 @@ + + + ofunc + source.js, source.ts, source.jsx, source.tsx + Snippet: object function + diff --git a/sublime/snippets/js/propPassThrough.sublime-snippet b/sublime/snippets/js/propPassThrough.sublime-snippet new file mode 100644 index 0000000..dfa32cd --- /dev/null +++ b/sublime/snippets/js/propPassThrough.sublime-snippet @@ -0,0 +1,8 @@ + + + ppt + source.js, source.ts, source.jsx, source.tsx + Snippet: pass through a prop to a sub-component + diff --git a/sublime/snippets/js/redlong.sublime-snippet b/sublime/snippets/js/redlong.sublime-snippet new file mode 100644 index 0000000..5f191a4 --- /dev/null +++ b/sublime/snippets/js/redlong.sublime-snippet @@ -0,0 +1,11 @@ + + { + $0 + return acc +}, ${2:{\}}); +]]> + redlong + source.js, source.ts, source.jsx, source.tsx + Snippet: .reduce(...) + diff --git a/sublime/snippets/js/require.sublime-snippet b/sublime/snippets/js/require.sublime-snippet new file mode 100644 index 0000000..2dac963 --- /dev/null +++ b/sublime/snippets/js/require.sublime-snippet @@ -0,0 +1,8 @@ + + + require + Snippet: CommonJS require + source.js, source.ts, source.jsx, source.tsx + diff --git a/sublime/snippets/js/ret.sublime-snippet b/sublime/snippets/js/ret.sublime-snippet new file mode 100644 index 0000000..9e05ae8 --- /dev/null +++ b/sublime/snippets/js/ret.sublime-snippet @@ -0,0 +1,8 @@ + + + ret + source.js, source.ts, source.jsx, source.tsx + Snippet: return + diff --git a/sublime/snippets/js/setinterval.sublime-snippet b/sublime/snippets/js/setinterval.sublime-snippet new file mode 100644 index 0000000..8f9a507 --- /dev/null +++ b/sublime/snippets/js/setinterval.sublime-snippet @@ -0,0 +1,10 @@ + + { + $0 +}, ${1:interval}); +]]> + setinterval + source.js, source.ts, source.jsx, source.tsx + Snippet: setInterval + diff --git a/sublime/snippets/js/settimeout.sublime-snippet b/sublime/snippets/js/settimeout.sublime-snippet new file mode 100644 index 0000000..44da3e9 --- /dev/null +++ b/sublime/snippets/js/settimeout.sublime-snippet @@ -0,0 +1,10 @@ + + { + $0 +}, ${1:timeout}); +]]> + settimeout + source.js, source.ts, source.jsx, source.tsx + Snippet: setTimeout + diff --git a/sublime/snippets/js/shebang.sublime-snippet b/sublime/snippets/js/shebang.sublime-snippet new file mode 100644 index 0000000..303bd4c --- /dev/null +++ b/sublime/snippets/js/shebang.sublime-snippet @@ -0,0 +1,9 @@ + + + shebang + source.js, source.ts + Snippet: Shebang for nodejs script + diff --git a/sublime/snippets/js/some.sublime-snippet b/sublime/snippets/js/some.sublime-snippet new file mode 100644 index 0000000..9cabe96 --- /dev/null +++ b/sublime/snippets/js/some.sublime-snippet @@ -0,0 +1,9 @@ + + { + ${0} +});]]> + some + source.js, source.ts, source.jsx, source.tsx +Snippet: some + diff --git a/sublime/snippets/js/try.sublime-snippet b/sublime/snippets/js/try.sublime-snippet new file mode 100644 index 0000000..82e6430 --- /dev/null +++ b/sublime/snippets/js/try.sublime-snippet @@ -0,0 +1,11 @@ + + + try + source.js, source.ts, source.jsx, source.tsx + Snippet: try/catch + diff --git a/sublime/snippets/js/tt.sublime-snippet b/sublime/snippets/js/tt.sublime-snippet new file mode 100644 index 0000000..95f0cd6 --- /dev/null +++ b/sublime/snippets/js/tt.sublime-snippet @@ -0,0 +1,8 @@ + + + tt + source.js, source.jsx, source.ts, source.tsx + [G] Snippet: Inserts const {prop} = this; + diff --git a/sublime/snippets/js/utilinspect.sublime-snippet b/sublime/snippets/js/utilinspect.sublime-snippet new file mode 100644 index 0000000..7a460da --- /dev/null +++ b/sublime/snippets/js/utilinspect.sublime-snippet @@ -0,0 +1,8 @@ + + + utilinspect + source.js, source.ts + Snippet: insert util.inspect + diff --git a/sublime/snippets/js/while.sublime-snippet b/sublime/snippets/js/while.sublime-snippet new file mode 100644 index 0000000..c5b65e6 --- /dev/null +++ b/sublime/snippets/js/while.sublime-snippet @@ -0,0 +1,10 @@ + + + while + source.js, source.ts, source.jsx, source.tsx, source.ts, source.tsx + Snippet: while + diff --git a/sublime/snippets/jsx/div.sublime-snippet b/sublime/snippets/jsx/div.sublime-snippet new file mode 100644 index 0000000..6152433 --- /dev/null +++ b/sublime/snippets/jsx/div.sublime-snippet @@ -0,0 +1,10 @@ + + + ${2:content} + +]]> + div + source.js, source.ts, source.jsx, source.tsx + Snippet: Insert a div + diff --git a/sublime/snippets/jsx/frag.sublime-snippet b/sublime/snippets/jsx/frag.sublime-snippet new file mode 100644 index 0000000..d8e8189 --- /dev/null +++ b/sublime/snippets/jsx/frag.sublime-snippet @@ -0,0 +1,10 @@ + + + ${1:stuff} + +]]> + frag + source.js, source.ts, source.jsx, source.tsx + Snippet: insert fragment + diff --git a/sublime/snippets/jsx/span.sublime-snippet b/sublime/snippets/jsx/span.sublime-snippet new file mode 100644 index 0000000..ae363fb --- /dev/null +++ b/sublime/snippets/jsx/span.sublime-snippet @@ -0,0 +1,10 @@ + + + ${2:content} + +]]> + span + source.js, source.ts, source.jsx, source.tsx + Snippet: Insert a span + diff --git a/sublime/snippets/react-hooks/usecallback.sublime-snippet b/sublime/snippets/react-hooks/usecallback.sublime-snippet new file mode 100644 index 0000000..4033c61 --- /dev/null +++ b/sublime/snippets/react-hooks/usecallback.sublime-snippet @@ -0,0 +1,8 @@ + + +usecallback +source.js, source.jsx, source.ts, source.tsx +useCallback + \ No newline at end of file diff --git a/sublime/snippets/react-hooks/useeffect.sublime-snippet b/sublime/snippets/react-hooks/useeffect.sublime-snippet new file mode 100644 index 0000000..279b40c --- /dev/null +++ b/sublime/snippets/react-hooks/useeffect.sublime-snippet @@ -0,0 +1,11 @@ + + { + ${1:effect} + return () => { + ${2:destructor} + }; +}, [${3:deps}]);]]> +useeffect +source.js, source.jsx, source.ts, source.tsx +useEffect + \ No newline at end of file diff --git a/sublime/snippets/react-hooks/usememo.sublime-snippet b/sublime/snippets/react-hooks/usememo.sublime-snippet new file mode 100644 index 0000000..a3ec2ce --- /dev/null +++ b/sublime/snippets/react-hooks/usememo.sublime-snippet @@ -0,0 +1,8 @@ + + { + return ${1:effect} +}, [${2:deps}]);]]> +usememo +source.js, source.jsx, source.ts, source.tsx +useEffect + \ No newline at end of file diff --git a/sublime/snippets/react-hooks/usercontext.sublime-snippet b/sublime/snippets/react-hooks/usercontext.sublime-snippet new file mode 100644 index 0000000..40a564c --- /dev/null +++ b/sublime/snippets/react-hooks/usercontext.sublime-snippet @@ -0,0 +1,8 @@ + + + usercontext + source.js, source.ts, source.jsx, source.tsx + Snippet: UserContext + diff --git a/sublime/snippets/react-hooks/usestate.sublime-snippet b/sublime/snippets/react-hooks/usestate.sublime-snippet new file mode 100644 index 0000000..11201d2 --- /dev/null +++ b/sublime/snippets/react-hooks/usestate.sublime-snippet @@ -0,0 +1,7 @@ + + +usestate +source.js, source.jsx, source.ts, source.tsx +Snippet: useState + \ No newline at end of file diff --git a/sublime/snippets/sh/black.sublime-snippet b/sublime/snippets/sh/black.sublime-snippet new file mode 100644 index 0000000..b4f1d8d --- /dev/null +++ b/sublime/snippets/sh/black.sublime-snippet @@ -0,0 +1,8 @@ + + + black + Snippet: Adds ANSI color code for black + source.shell + diff --git a/sublime/snippets/sh/blue.sublime-snippet b/sublime/snippets/sh/blue.sublime-snippet new file mode 100644 index 0000000..4f7f675 --- /dev/null +++ b/sublime/snippets/sh/blue.sublime-snippet @@ -0,0 +1,8 @@ + + + blue + Snippet: Adds ANSI color code for blue + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/brown.sublime-snippet b/sublime/snippets/sh/brown.sublime-snippet new file mode 100644 index 0000000..2415dc0 --- /dev/null +++ b/sublime/snippets/sh/brown.sublime-snippet @@ -0,0 +1,8 @@ + + + brown + Snippet: Adds ANSI color code for brown + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/cdgitroot.sublime-snippet b/sublime/snippets/sh/cdgitroot.sublime-snippet new file mode 100644 index 0000000..a2d2178 --- /dev/null +++ b/sublime/snippets/sh/cdgitroot.sublime-snippet @@ -0,0 +1,8 @@ + + + cdgitroot + Snippet: adds cd to git root + source.shell + diff --git a/sublime/snippets/sh/cyan.sublime-snippet b/sublime/snippets/sh/cyan.sublime-snippet new file mode 100644 index 0000000..46ba624 --- /dev/null +++ b/sublime/snippets/sh/cyan.sublime-snippet @@ -0,0 +1,8 @@ + + + cyan + Snippet: Adds ANSI color code for cyan + source.shell + diff --git a/sublime/snippets/sh/gray.sublime-snippet b/sublime/snippets/sh/gray.sublime-snippet new file mode 100644 index 0000000..82d8afa --- /dev/null +++ b/sublime/snippets/sh/gray.sublime-snippet @@ -0,0 +1,8 @@ + + + gray + Snippet: Adds ANSI color code for gray + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/green.sublime-snippet b/sublime/snippets/sh/green.sublime-snippet new file mode 100644 index 0000000..7d7657c --- /dev/null +++ b/sublime/snippets/sh/green.sublime-snippet @@ -0,0 +1,8 @@ + + + green + Snippet: Adds ANSI color code for green + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/light_blue.sublime-snippet b/sublime/snippets/sh/light_blue.sublime-snippet new file mode 100644 index 0000000..ebe749b --- /dev/null +++ b/sublime/snippets/sh/light_blue.sublime-snippet @@ -0,0 +1,8 @@ + + + lightblue + Snippet: Adds ANSI color code for light blue + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/light_cyan.sublime-snippet b/sublime/snippets/sh/light_cyan.sublime-snippet new file mode 100644 index 0000000..de86d16 --- /dev/null +++ b/sublime/snippets/sh/light_cyan.sublime-snippet @@ -0,0 +1,8 @@ + + + lightcyan + Snippet: Adds ANSI color code for light cyan + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/light_gray.sublime-snippet b/sublime/snippets/sh/light_gray.sublime-snippet new file mode 100644 index 0000000..b110508 --- /dev/null +++ b/sublime/snippets/sh/light_gray.sublime-snippet @@ -0,0 +1,8 @@ + + + lightgray + Snippet: Adds ANSI color code for light gray + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/light_green.sublime-snippet b/sublime/snippets/sh/light_green.sublime-snippet new file mode 100644 index 0000000..661d0a6 --- /dev/null +++ b/sublime/snippets/sh/light_green.sublime-snippet @@ -0,0 +1,8 @@ + + + lightgreen + Snippet: Adds ANSI color code for light green + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/light_purple.sublime-snippet b/sublime/snippets/sh/light_purple.sublime-snippet new file mode 100644 index 0000000..15a78f8 --- /dev/null +++ b/sublime/snippets/sh/light_purple.sublime-snippet @@ -0,0 +1,8 @@ + + + lightpurple + Snippet: Adds ANSI color code for light purple + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/light_red.sublime-snippet b/sublime/snippets/sh/light_red.sublime-snippet new file mode 100644 index 0000000..39626b7 --- /dev/null +++ b/sublime/snippets/sh/light_red.sublime-snippet @@ -0,0 +1,8 @@ + + + lightred + Snippet: Adds ANSI color code for lightred + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/purple.sublime-snippet b/sublime/snippets/sh/purple.sublime-snippet new file mode 100644 index 0000000..380a64c --- /dev/null +++ b/sublime/snippets/sh/purple.sublime-snippet @@ -0,0 +1,8 @@ + + + purple + Snippet: Adds ANSI color code for purple + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/red.sublime-snippet b/sublime/snippets/sh/red.sublime-snippet new file mode 100644 index 0000000..7fa7ce9 --- /dev/null +++ b/sublime/snippets/sh/red.sublime-snippet @@ -0,0 +1,8 @@ + + + red + Snippet: Adds ANSI color code for red + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/resetcolor.sublime-snippet b/sublime/snippets/sh/resetcolor.sublime-snippet new file mode 100644 index 0000000..9109cc8 --- /dev/null +++ b/sublime/snippets/sh/resetcolor.sublime-snippet @@ -0,0 +1,8 @@ + + + resetcolor + Snippet: Adds ANSI color code to reset the color + source.shell + \ No newline at end of file diff --git a/sublime/snippets/sh/shebang.sublime-snippet b/sublime/snippets/sh/shebang.sublime-snippet new file mode 100644 index 0000000..490d8f9 --- /dev/null +++ b/sublime/snippets/sh/shebang.sublime-snippet @@ -0,0 +1,9 @@ + + + shebang + source.shell + Snippet: Shebang for bash script + diff --git a/sublime/snippets/sh/yellow.sublime-snippet b/sublime/snippets/sh/yellow.sublime-snippet new file mode 100644 index 0000000..6d08b75 --- /dev/null +++ b/sublime/snippets/sh/yellow.sublime-snippet @@ -0,0 +1,8 @@ + + + yellow + Snippet: Adds ANSI color code for yellow + source.shell + \ No newline at end of file diff --git a/sublime/snippets/ts/nnull.sublime-snippet b/sublime/snippets/ts/nnull.sublime-snippet new file mode 100644 index 0000000..9d80554 --- /dev/null +++ b/sublime/snippets/ts/nnull.sublime-snippet @@ -0,0 +1,8 @@ + + +]]> + nnull + source.ts, source.tsx + Snippet: NonNullable + diff --git a/sublime/snippets/tsx/dummy.sublime-snippet b/sublime/snippets/tsx/dummy.sublime-snippet new file mode 100644 index 0000000..86d34ab --- /dev/null +++ b/sublime/snippets/tsx/dummy.sublime-snippet @@ -0,0 +1,8 @@ + + + $^&*dummy + source.tsx + Snippet: dummy + diff --git a/vscode/extension/rkoval/.gitignore b/vscode/extension/rkoval.rkoval-0.0.1/.gitignore similarity index 100% rename from vscode/extension/rkoval/.gitignore rename to vscode/extension/rkoval.rkoval-0.0.1/.gitignore diff --git a/vscode/extension/rkoval/.nvmrc b/vscode/extension/rkoval.rkoval-0.0.1/.nvmrc similarity index 100% rename from vscode/extension/rkoval/.nvmrc rename to vscode/extension/rkoval.rkoval-0.0.1/.nvmrc diff --git a/vscode/extension/rkoval/.vscode-test.mjs b/vscode/extension/rkoval.rkoval-0.0.1/.vscode-test.mjs similarity index 100% rename from vscode/extension/rkoval/.vscode-test.mjs rename to vscode/extension/rkoval.rkoval-0.0.1/.vscode-test.mjs diff --git a/vscode/extension/rkoval/.vscodeignore b/vscode/extension/rkoval.rkoval-0.0.1/.vscodeignore similarity index 100% rename from vscode/extension/rkoval/.vscodeignore rename to vscode/extension/rkoval.rkoval-0.0.1/.vscodeignore diff --git a/vscode/extension/rkoval/CHANGELOG.md b/vscode/extension/rkoval.rkoval-0.0.1/CHANGELOG.md similarity index 100% rename from vscode/extension/rkoval/CHANGELOG.md rename to vscode/extension/rkoval.rkoval-0.0.1/CHANGELOG.md diff --git a/vscode/extension/rkoval/eslint.config.mjs b/vscode/extension/rkoval.rkoval-0.0.1/eslint.config.mjs similarity index 100% rename from vscode/extension/rkoval/eslint.config.mjs rename to vscode/extension/rkoval.rkoval-0.0.1/eslint.config.mjs diff --git a/vscode/extension/rkoval/install-into-vscode.sh b/vscode/extension/rkoval.rkoval-0.0.1/install-into-vscode.sh old mode 100644 new mode 100755 similarity index 100% rename from vscode/extension/rkoval/install-into-vscode.sh rename to vscode/extension/rkoval.rkoval-0.0.1/install-into-vscode.sh diff --git a/vscode/extension/rkoval/package-lock.json b/vscode/extension/rkoval.rkoval-0.0.1/package-lock.json similarity index 100% rename from vscode/extension/rkoval/package-lock.json rename to vscode/extension/rkoval.rkoval-0.0.1/package-lock.json diff --git a/vscode/extension/rkoval/package.json b/vscode/extension/rkoval.rkoval-0.0.1/package.json similarity index 52% rename from vscode/extension/rkoval/package.json rename to vscode/extension/rkoval.rkoval-0.0.1/package.json index 8f10cae..dcb2179 100644 --- a/vscode/extension/rkoval/package.json +++ b/vscode/extension/rkoval.rkoval-0.0.1/package.json @@ -1,8 +1,7 @@ { "name": "rkoval", - "displayName": "rkoval", "description": "Ryan Koval's VSCode Extension", - "publisher": "Ryan Koval", + "publisher": "rkoval", "version": "0.0.1", "engines": { "vscode": "1.93.1" @@ -13,6 +12,40 @@ "activationEvents": [], "main": "./out/extension.js", "contributes": { + "snippets": [ + { + "language": "javascript", + "path": "./snippets/js.code-snippets" + }, + { + "language": "javascriptreact", + "path": "./snippets/jsx.code-snippets" + }, + { + "language": "javascriptreact", + "path": "./snippets/react-hooks.code-snippets" + }, + { + "language": "typescript", + "path": "./snippets/js.code-snippets" + }, + { + "language": "typescript", + "path": "./snippets/ts.code-snippets" + }, + { + "language": "typescriptreact", + "path": "./snippets/tsx.code-snippets" + }, + { + "language": "typescriptreact", + "path": "./snippets/jsx.code-snippets" + }, + { + "language": "shellscript", + "path": "./snippets/sh.code-snippets" + } + ], "commands": [ { "command": "rkoval.helloWorld", diff --git a/vscode/extension/rkoval/prettier.config.js b/vscode/extension/rkoval.rkoval-0.0.1/prettier.config.js similarity index 100% rename from vscode/extension/rkoval/prettier.config.js rename to vscode/extension/rkoval.rkoval-0.0.1/prettier.config.js diff --git a/vscode/extension/rkoval.rkoval-0.0.1/snippets/js.code-snippets b/vscode/extension/rkoval.rkoval-0.0.1/snippets/js.code-snippets new file mode 100644 index 0000000..3f19b97 --- /dev/null +++ b/vscode/extension/rkoval.rkoval-0.0.1/snippets/js.code-snippets @@ -0,0 +1,386 @@ +{ + "aarrfunc": { + "prefix": "aarrfunc", + "body": "async (${1:params}) => {\n $0\n},", + "description": "Snippet: async arrow function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "afunc": { + "prefix": "afunc", + "body": "async function ${1:name}(${2:params}) {\n $0\n}", + "description": "Snippet: async function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "aofunc": { + "prefix": "aofunc", + "body": "async ${1:name}(${2:params}) {\n $0\n}", + "description": "Snippet: async object function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "arrayfrom": { + "prefix": "arrayfrom", + "body": "Array.from({ length: ${1:length} }, (_, i) => {\n return $0\n});", + "description": "Snippet: Array.from", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "arrfunc": { + "prefix": "arrfunc", + "body": "(${1:params}) => {\n $0\n}", + "description": "Snippet: arrow function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "asd": { + "prefix": "asd", + "body": "assert.deepStrictEqual(${1:paramName}, ${2:paramName}, `${3:expected ${JSON.stringify(${1:paramName})\\} but got ${JSON.stringify(${2:paramName})\\}}`);", + "description": "Snippet: Insert assert deep strict equal", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "asdse": { + "prefix": "asdse", + "body": "assert.deepStrictEqual(${1:actual}, ${2:expected}, '${3:was not equal}')", + "description": "Snippet: Insert assert", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "ase": { + "prefix": "ase", + "body": "assert.strictEqual(${1:paramName}, ${2:paramName}, `${3:${1:paramName} was not equal}`);", + "description": "Snippet: Insert assert strict equal", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "asm": { + "prefix": "asm", + "body": "static async ${1:StaticMethodName}(${2:}) {\n ${3:}\n}", + "description": "Snippet: async static method", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "ast": { + "prefix": "ast", + "body": "assert(${1:paramName}, `${2:${1:paramName} is required}`);", + "description": "Snippet: Insert assert", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "astarray": { + "prefix": "astarray", + "body": "assert(Array.isArray(${1:array}), `${2:${1:array} must be an array}`);", + "description": "Snippet: Insert assert for type array", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "astfunction": { + "prefix": "astfunction", + "body": "assert.strictEqual(typeof ${1:paramName}, 'function', `${2:${1:paramName} must be a function}`);", + "description": "Snippet: Insert assert for type function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "astnumber": { + "prefix": "astnumber", + "body": "assert.strictEqual(typeof ${1:paramName}, 'number', `${2:${1:paramName} must be a number}`);", + "description": "Snippet: Insert assert for type number", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "aststring": { + "prefix": "aststring", + "body": "assert.strictEqual(typeof ${1:paramName}, 'string', `${2:${1:paramName} must be a string}`);\nassert(${1:paramName}.length > 0, `${3:${1:paramName} must not be empty}`);", + "description": "Snippet: Insert assert for type string", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "constructor": { + "prefix": "constructor", + "body": "constructor(...args) {\n super(...args);\n $1\n}", + "description": "Snippet: insert a constructor", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "dbtx": { + "prefix": "dbtx", + "body": "const result = await db.tx(async t => {\n\treturn t.batch([\n\t\t${1:// something}\n\t]):\n});", + "description": "Snippet: db.tx()", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "debugger": { + "prefix": "debugger", + "body": "let that = this;\ndebugger;", + "description": "debugger statement with 'this' (that) context", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "eafunc": { + "prefix": "eafunc", + "body": "export async function ${1:name}(${2:params}) {\n $0\n}", + "description": "Snippet: export async function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "edefault": { + "prefix": "edefault", + "body": "export default ${1:member};", + "description": "Snippet: export default", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "efunc": { + "prefix": "efunc", + "body": "export default function ${1:name}(${2:params}) {\n $0\n}", + "description": "Snippet: export function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "efunc1": { + "prefix": "efunc", + "body": "export function ${1:name}(${2:params}) {\n $0\n}", + "description": "Snippet: export function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "else": { + "prefix": "else", + "body": "else {\n $0\n}", + "description": "Snippet: else", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "elseif": { + "prefix": "elseif", + "body": "else if (${1:condition}) {\n ${0}\n}", + "description": "Snippet: else if", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "errlogger": { + "prefix": "errlogger", + "body": "ErrorLogger.Log(error)", + "description": "", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "eslint-disable": { + "prefix": "eslint-disable", + "body": "// ${1:please explain why you're doing this (required)}\n// eslint-disable-next-line ${2:eslint-rule-name (required)}", + "description": "Snippet: disables eslint rule", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "filter": { + "prefix": "filter", + "body": "filter((${1:item}) => {\n return ${2:condition};\n})", + "description": "Snippet: filter. inserts common `filter` function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "find": { + "prefix": "find", + "body": "find((${1:item}) => {\n $0\n return ${2:trueOrFalse}\n})", + "description": "Snippet: find function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "fn": { + "prefix": "fn", + "body": "${TM_FILENAME/(.+)\\..+|.*/$1/:name}$0", + "description": "Snippet: inserts filename without extensions", + "scope": "", + }, + "foreach": { + "prefix": "foreach", + "body": "forEach((${1:item}) => {\n $0\n})", + "description": "Snippet: foreach. inserts common `foreach` function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "forin": { + "prefix": "forin", + "body": "for (const ${1:property} in ${2:object}) {\n const item = ${2:object}[${1:property}];\n}", + "description": "Snippet: for...in object", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "forloop": { + "prefix": "forloop", + "body": "for (let i = 0; i < ${2:${1:arr}.length}; i++) {\n const ${3:element} = ${1:arr}[i];\n $0\n}", + "description": "Snippet: forloop", + "scope": "source.js, source.ts, source.jsx, source.tsx, source.ts, source.tsx", + }, + "forof": { + "prefix": "forof", + "body": "for (const ${1:element} of ${1:element}s) {\n // TODO\n}", + "description": "Snippet: for...of (array)", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "func": { + "prefix": "func", + "body": "function ${1:name}(${2:params}) {\n $0\n}", + "description": "Snippet: function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "idx": { + "prefix": "idx", + "body": "create index if not exists ${1:table_name}_${2:field_name} on ${1:table_name} (${2:field_name});", + "description": "Snippet: insert index;", + "scope": "source.sql", + }, + "if": { + "prefix": "if", + "body": "if (${1:condition}) {\n $0\n}", + "description": "Snippet: if", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "iife": { + "prefix": "iife", + "body": "(() => {\n ${1:// code here}\n})();", + "description": "Snippet: inserts an iife", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "insertMulti": { + "prefix": "insertMulti", + "body": "const insertStatement = helpers.insert(\n ${1:arrayName}.map(row => ({${2:data}})),\n ['${3:columns}'],\n '${4:table}'\n );", + "description": "Snippet: Creates a multi-insert database statement", + "scope": "source.js, source.ts", + }, + "jsonstringify": { + "prefix": "jsonstringify", + "body": "JSON.stringify(${1:object}${2:, null, 2})", + "description": "Snippet: inserts `JSON.stringify(...)`", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "log": { + "prefix": "log", + "body": "console.log($1);$0", + "description": "", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "logger": { + "prefix": "logger", + "body": "Logger.Log(Events.$1${2:, {\n ${3:eventProp}\n\\}});", + "description": "", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "main": { + "prefix": "main", + "body": "(async function main() {\n ${0:// code goes here}\n})().catch(error => {\n process.exitCode = 1;\n console.error(error);\n});", + "description": "Snippet: insert main function for a CLI tool", + "scope": "source.js, source.ts", + }, + "map": { + "prefix": "map", + "body": "map((${1:item}) => {\n $0\n return ${2:mapped};\n})", + "description": "Snippet: map. inserts common `map` function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "mapprop": { + "prefix": "mapprop", + "body": "map(({${1:prop}}) => ${1:prop})$0", + "description": "Snippet: map prop. inserts map function to extract a property", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "nc": { + "prefix": "nc", + "body": "export default class ${1:${TM_FILENAME/(.+)\\..+|.*/$1/:name}} {\n ${2:constructor() {\n super();\n ${3://tab to complete}\n }}\n}", + "description": "Snippet: new class (non-component)", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "newpromise": { + "prefix": "newpromise", + "body": "new Promise((resolve, reject) => {\n\t${1:// do something}\n});", + "description": "Snippet: new Promise", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "nocom": { + "prefix": "nocom", + "body": "/* NOCOMMIT ${1:todo} */$0", + "description": "Snippet: Inserts NOCOMMIT message", + "scope": "source.js, source.ts, source.jsx, source.tsx, source.scss", + }, + "nsc": { + "prefix": "nsc", + "body": "export default class ${1:${TM_FILENAME/(.+?)(\\.(server|client))?\\..+|.*/$1/:name}} {\n}", + "description": "Snippet: new static class", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "obje": { + "prefix": "obje", + "body": "Object.entries(${1:obj})", + "description": "Snippet: Object.entries", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "objk": { + "prefix": "objk", + "body": "Object.keys(${1:obj})", + "description": "Snippet: Object.keys", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "objv": { + "prefix": "objv", + "body": "Object.values(${1:obj})", + "description": "Snippet: Object.values", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "odes": { + "prefix": "odes", + "body": "const {${1:property}} = ${2:obj};\n$0", + "description": "Snippet: object destructure", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "ofunc": { + "prefix": "ofunc", + "body": "${1:name}(${2:params}) {\n $0\n},", + "description": "Snippet: object function", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "ppt": { + "prefix": "ppt", + "body": "${1:prop}={${1:prop}}", + "description": "Snippet: pass through a prop to a sub-component", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "redlong": { + "prefix": "redlong", + "body": "reduce((acc, ${1:val}) => {\n $0\n return acc\n}, ${2:{\\}});", + "description": "Snippet: .reduce(...)", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "require": { + "prefix": "require", + "body": "const ${1:module} = require('${1:module}');", + "description": "Snippet: CommonJS require", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "ret": { + "prefix": "ret", + "body": "return $0", + "description": "Snippet: return", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "setinterval": { + "prefix": "setinterval", + "body": "setInterval(() => {\n $0\n}, ${1:interval});", + "description": "Snippet: setInterval", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "settimeout": { + "prefix": "settimeout", + "body": "setTimeout(() => {\n $0\n}, ${1:timeout});", + "description": "Snippet: setTimeout", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "shebang": { + "prefix": "shebang", + "body": "#!/usr/bin/env node\n$0", + "description": "Snippet: Shebang for nodejs script", + "scope": "source.js, source.ts", + }, + "some": { + "prefix": "some", + "body": "some((${1:item}) => {\n ${0}\n});", + "description": "Snippet: some", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "try": { + "prefix": "try", + "body": "try {\n $0\n} catch (error) {\n ErrorLogger.Log(error)\n}", + "description": "Snippet: try/catch", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "tt": { + "prefix": "tt", + "body": "const {${1:prop}} = this;", + "description": "[G] Snippet: Inserts const {prop} = this;", + "scope": "source.js, source.jsx, source.ts, source.tsx", + }, + "utilinspect": { + "prefix": "utilinspect", + "body": "util.inspect(${1:data}, false, null, true)", + "description": "Snippet: insert util.inspect", + "scope": "source.js, source.ts", + }, + "while": { + "prefix": "while", + "body": "while (${1:condition}) {\n $0\n}", + "description": "Snippet: while", + "scope": "source.js, source.ts, source.jsx, source.tsx, source.ts, source.tsx", + }, +} diff --git a/vscode/extension/rkoval.rkoval-0.0.1/snippets/jsx.code-snippets b/vscode/extension/rkoval.rkoval-0.0.1/snippets/jsx.code-snippets new file mode 100644 index 0000000..11ba21c --- /dev/null +++ b/vscode/extension/rkoval.rkoval-0.0.1/snippets/jsx.code-snippets @@ -0,0 +1,20 @@ +{ + "div": { + "prefix": "div", + "body": "
\n ${2:content}\n
", + "description": "Snippet: Insert a div", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "frag": { + "prefix": "frag", + "body": "\n ${1:stuff}\n", + "description": "Snippet: insert fragment", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "span": { + "prefix": "span", + "body": "\n ${2:content}\n", + "description": "Snippet: Insert a span", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, +} diff --git a/vscode/extension/rkoval.rkoval-0.0.1/snippets/react-hooks.code-snippets b/vscode/extension/rkoval.rkoval-0.0.1/snippets/react-hooks.code-snippets new file mode 100644 index 0000000..76c0a35 --- /dev/null +++ b/vscode/extension/rkoval.rkoval-0.0.1/snippets/react-hooks.code-snippets @@ -0,0 +1,32 @@ +{ + "usecallback": { + "prefix": "usecallback", + "body": "const ${1:fn} = useCallback(function() {\n ${2:body}\n}, [${3:dep}]);", + "description": "useCallback", + "scope": "source.js, source.jsx, source.ts, source.tsx", + }, + "useeffect": { + "prefix": "useeffect", + "body": "useEffect(() => {\n ${1:effect}\n return () => {\n ${2:destructor}\n };\n}, [${3:deps}]);", + "description": "useEffect", + "scope": "source.js, source.jsx, source.ts, source.tsx", + }, + "usememo": { + "prefix": "usememo", + "body": "useMemo(() => {\n return ${1:effect}\n}, [${2:deps}]);", + "description": "useEffect", + "scope": "source.js, source.jsx, source.ts, source.tsx", + }, + "usercontext": { + "prefix": "usercontext", + "body": "const {user} = useContext(UserContext);", + "description": "Snippet: UserContext", + "scope": "source.js, source.ts, source.jsx, source.tsx", + }, + "usestate": { + "prefix": "usestate", + "body": "const [${2:state}, ${3:setState}] = useState(${1:obj});", + "description": "Snippet: useState", + "scope": "source.js, source.jsx, source.ts, source.tsx", + }, +} diff --git a/vscode/extension/rkoval.rkoval-0.0.1/snippets/sh.code-snippets b/vscode/extension/rkoval.rkoval-0.0.1/snippets/sh.code-snippets new file mode 100644 index 0000000..4145357 --- /dev/null +++ b/vscode/extension/rkoval.rkoval-0.0.1/snippets/sh.code-snippets @@ -0,0 +1,110 @@ +{ + "black": { + "prefix": "black", + "body": "BLACK='\\033[0;30m'", + "description": "Snippet: Adds ANSI color code for black", + "scope": "source.shell", + }, + "blue": { + "prefix": "blue", + "body": "BLUE='\\033[0;34m'", + "description": "Snippet: Adds ANSI color code for blue", + "scope": "source.shell", + }, + "brown": { + "prefix": "brown", + "body": "BROWN='\\033[0;33m'", + "description": "Snippet: Adds ANSI color code for brown", + "scope": "source.shell", + }, + "cdgitroot": { + "prefix": "cdgitroot", + "body": "cd \"$(git rev-parse --show-toplevel)\" || exit 1", + "description": "Snippet: adds cd to git root", + "scope": "source.shell", + }, + "cyan": { + "prefix": "cyan", + "body": "CYAN='\\033[0;36m'", + "description": "Snippet: Adds ANSI color code for cyan", + "scope": "source.shell", + }, + "gray": { + "prefix": "gray", + "body": "GRAY='\\033[1;30m'", + "description": "Snippet: Adds ANSI color code for gray", + "scope": "source.shell", + }, + "green": { + "prefix": "green", + "body": "GREEN=\"\\033[0;32m\"", + "description": "Snippet: Adds ANSI color code for green", + "scope": "source.shell", + }, + "lightblue": { + "prefix": "lightblue", + "body": "LIGHT_BLUE='\\033[1;34m'", + "description": "Snippet: Adds ANSI color code for light blue", + "scope": "source.shell", + }, + "lightcyan": { + "prefix": "lightcyan", + "body": "LIGHT_CYAN='\\033[1;36m'", + "description": "Snippet: Adds ANSI color code for light cyan", + "scope": "source.shell", + }, + "lightgray": { + "prefix": "lightgray", + "body": "LIGHT_GRAY='\\033[0;37m'", + "description": "Snippet: Adds ANSI color code for light gray", + "scope": "source.shell", + }, + "lightgreen": { + "prefix": "lightgreen", + "body": "LIGHT_GREEN='\\033[1;32m'", + "description": "Snippet: Adds ANSI color code for light green", + "scope": "source.shell", + }, + "lightpurple": { + "prefix": "lightpurple", + "body": "LIGHT_PURPLE='\\033[1;35m'", + "description": "Snippet: Adds ANSI color code for light purple", + "scope": "source.shell", + }, + "lightred": { + "prefix": "lightred", + "body": "LIGHT_RED='\\033[1;31m'", + "description": "Snippet: Adds ANSI color code for lightred", + "scope": "source.shell", + }, + "purple": { + "prefix": "purple", + "body": "PURPLE='\\033[0;35m'", + "description": "Snippet: Adds ANSI color code for purple", + "scope": "source.shell", + }, + "red": { + "prefix": "red", + "body": "RED='\\033[0;31m'", + "description": "Snippet: Adds ANSI color code for red", + "scope": "source.shell", + }, + "resetcolor": { + "prefix": "resetcolor", + "body": "RESET_COLOR='\\033[0m'", + "description": "Snippet: Adds ANSI color code to reset the color", + "scope": "source.shell", + }, + "shebang": { + "prefix": "shebang", + "body": "#!/usr/bin/env bash\n$0", + "description": "Snippet: Shebang for bash script", + "scope": "source.shell", + }, + "yellow": { + "prefix": "yellow", + "body": "YELLOW='\\033[1;33m'", + "description": "Snippet: Adds ANSI color code for yellow", + "scope": "source.shell", + }, +} diff --git a/vscode/extension/rkoval.rkoval-0.0.1/snippets/ts.code-snippets b/vscode/extension/rkoval.rkoval-0.0.1/snippets/ts.code-snippets new file mode 100644 index 0000000..e753406 --- /dev/null +++ b/vscode/extension/rkoval.rkoval-0.0.1/snippets/ts.code-snippets @@ -0,0 +1,8 @@ +{ + "nnull": { + "prefix": "nnull", + "body": "NonNullable<${1:T}>", + "description": "Snippet: NonNullable", + "scope": "source.ts, source.tsx", + }, +} diff --git a/vscode/extension/rkoval.rkoval-0.0.1/snippets/tsx.code-snippets b/vscode/extension/rkoval.rkoval-0.0.1/snippets/tsx.code-snippets new file mode 100644 index 0000000..53b15a9 --- /dev/null +++ b/vscode/extension/rkoval.rkoval-0.0.1/snippets/tsx.code-snippets @@ -0,0 +1,8 @@ +{ + "$^&*dummy": { + "prefix": "$^&*dummy", + "body": "dummy", + "description": "Snippet: dummy", + "scope": "source.tsx", + }, +} diff --git a/vscode/extension/rkoval.rkoval-0.0.1/src/commands/openFileFromCursor.ts b/vscode/extension/rkoval.rkoval-0.0.1/src/commands/openFileFromCursor.ts new file mode 100644 index 0000000..b1f5178 --- /dev/null +++ b/vscode/extension/rkoval.rkoval-0.0.1/src/commands/openFileFromCursor.ts @@ -0,0 +1,23 @@ +import * as vscode from 'vscode'; +import * as path from 'path'; + +export async function openFileFromCursor() { + const editor = vscode.window.activeTextEditor; + + if (!editor) { + vscode.window.showErrorMessage('No active editor found.'); + return; + } + + const document = editor.document; + const position = editor.selection.active; + const wordRange = document.getWordRangeAtPosition(position); + + if (!wordRange) { + vscode.window.showErrorMessage('No text found under cursor.'); + return; + } + + const word = document.getText(wordRange); + await vscode.commands.executeCommand('workbench.action.quickOpen', word); +} diff --git a/vscode/extension/rkoval/src/commands/registerCommands.ts b/vscode/extension/rkoval.rkoval-0.0.1/src/commands/registerCommands.ts similarity index 72% rename from vscode/extension/rkoval/src/commands/registerCommands.ts rename to vscode/extension/rkoval.rkoval-0.0.1/src/commands/registerCommands.ts index eb32971..7e32d68 100644 --- a/vscode/extension/rkoval/src/commands/registerCommands.ts +++ b/vscode/extension/rkoval.rkoval-0.0.1/src/commands/registerCommands.ts @@ -3,7 +3,7 @@ import {openFileFromCursor} from './openFileFromCursor'; export function registerCommands(context: vscode.ExtensionContext) { context.subscriptions.push( - vscode.commands.registerCommand('extension.openFileFromCursor', openFileFromCursor), + vscode.commands.registerCommand('rkoval.openFileFromCursor', openFileFromCursor), // Register additional commands here ); } diff --git a/vscode/extension/rkoval.rkoval-0.0.1/src/extension.ts b/vscode/extension/rkoval.rkoval-0.0.1/src/extension.ts new file mode 100644 index 0000000..03ad6cd --- /dev/null +++ b/vscode/extension/rkoval.rkoval-0.0.1/src/extension.ts @@ -0,0 +1,10 @@ +import {registerCommands} from './commands/registerCommands'; + +import * as vscode from 'vscode'; + +export function activate(context: vscode.ExtensionContext) { + console.log('rkoval extension activated'); + registerCommands(context); +} + +export function deactivate() {} diff --git a/vscode/extension/rkoval/tsconfig.json b/vscode/extension/rkoval.rkoval-0.0.1/tsconfig.json similarity index 100% rename from vscode/extension/rkoval/tsconfig.json rename to vscode/extension/rkoval.rkoval-0.0.1/tsconfig.json diff --git a/vscode/extension/rkoval/README.md b/vscode/extension/rkoval/README.md deleted file mode 100644 index ef25d84..0000000 --- a/vscode/extension/rkoval/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# rkoval README - -This is the README for your extension "rkoval". After writing up a brief description, we recommend including the following sections. - -## Features - -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. - -For example if there is an image subfolder under your extension project workspace: - -\!\[feature X\]\(images/feature-x.png\) - -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. - -## Requirements - -If you have any requirements or dependencies, add a section describing those and how to install and configure them. - -## Extension Settings - -Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. - -For example: - -This extension contributes the following settings: - -* `myExtension.enable`: Enable/disable this extension. -* `myExtension.thing`: Set to `blah` to do something. - -## Known Issues - -Calling out known issues can help limit users opening duplicate issues against your extension. - -## Release Notes - -Users appreciate release notes as you update your extension. - -### 1.0.0 - -Initial release of ... - -### 1.0.1 - -Fixed issue #. - -### 1.1.0 - -Added features X, Y, and Z. - ---- - -## Following extension guidelines - -Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension. - -* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines) - -## Working with Markdown - -You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: - -* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux). -* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux). -* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets. - -## For more information - -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) - -**Enjoy!** diff --git a/vscode/extension/rkoval/src/commands/openFileFromCursor.ts b/vscode/extension/rkoval/src/commands/openFileFromCursor.ts deleted file mode 100644 index 277b97b..0000000 --- a/vscode/extension/rkoval/src/commands/openFileFromCursor.ts +++ /dev/null @@ -1,49 +0,0 @@ -import * as vscode from "vscode"; -import * as path from "path"; - -export async function openFileFromCursor() { - const editor = vscode.window.activeTextEditor; - - if (!editor) { - vscode.window.showErrorMessage("No active editor found."); - return; - } - - const document = editor.document; - const position = editor.selection.active; - const wordRange = document.getWordRangeAtPosition(position); - - if (!wordRange) { - vscode.window.showErrorMessage("No text found under cursor."); - return; - } - - const word = document.getText(wordRange); - - const workspaceFolders = vscode.workspace.workspaceFolders; - - if (!workspaceFolders) { - vscode.window.showErrorMessage("No workspace folder open."); - return; - } - - const defaultUri = vscode.Uri.file( - path.join(workspaceFolders[0].uri.fsPath, word) - ); - - const options: vscode.OpenDialogOptions = { - canSelectMany: false, - defaultUri: defaultUri, - openLabel: "Open", - filters: { - "All Files": ["*"], - }, - }; - - const fileUri = await vscode.window.showOpenDialog(options); - - if (fileUri && fileUri[0]) { - const doc = await vscode.workspace.openTextDocument(fileUri[0]); - await vscode.window.showTextDocument(doc); - } -} diff --git a/vscode/extension/rkoval/src/extension.ts b/vscode/extension/rkoval/src/extension.ts deleted file mode 100644 index 54b54df..0000000 --- a/vscode/extension/rkoval/src/extension.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {registerCommands} from './commands/registerCommands'; - -import * as vscode from 'vscode'; - -export function activate(context: vscode.ExtensionContext) { - console.log('Congratulations, your extension "rkoval" is now active!'); - - const disposable = vscode.commands.registerCommand('rkoval.helloWorld', () => { - vscode.window.showInformationMessage('Hello World from rkoval!!!!!!!!!!!!!!'); - }); - - context.subscriptions.push(disposable); - // registerCommands(context); -} - -export function deactivate() {} diff --git a/vscode/extension/rkoval/vsc-extension-quickstart.md b/vscode/extension/rkoval/vsc-extension-quickstart.md deleted file mode 100644 index c912064..0000000 --- a/vscode/extension/rkoval/vsc-extension-quickstart.md +++ /dev/null @@ -1,44 +0,0 @@ -# Welcome to your VS Code Extension - -## What's in the folder - -* This folder contains all of the files necessary for your extension. -* `package.json` - this is the manifest file in which you declare your extension and command. - * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. -* `src/extension.ts` - this is the main file where you will provide the implementation of your command. - * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. - * We pass the function containing the implementation of the command as the second parameter to `registerCommand`. - -## Get up and running straight away - -* Press `F5` to open a new window with your extension loaded. -* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`. -* Set breakpoints in your code inside `src/extension.ts` to debug your extension. -* Find output from your extension in the debug console. - -## Make changes - -* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`. -* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. - -## Explore the API - -* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`. - -## Run tests - -* Install the [Extension Test Runner](https://marketplace.visualstudio.com/items?itemName=ms-vscode.extension-test-runner) -* Run the "watch" task via the **Tasks: Run Task** command. Make sure this is running, or tests might not be discovered. -* Open the Testing view from the activity bar and click the Run Test" button, or use the hotkey `Ctrl/Cmd + ; A` -* See the output of the test result in the Test Results view. -* Make changes to `src/test/extension.test.ts` or create new test files inside the `test` folder. - * The provided test runner will only consider files matching the name pattern `**.test.ts`. - * You can create folders inside the `test` folder to structure your tests any way you want. - -## Go further - -* [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create extensions that seamlessly integrate with VS Code's native interface and patterns. -* Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension). -* [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code extension marketplace. -* Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration). -* Integrate to the [report issue](https://code.visualstudio.com/api/get-started/wrapping-up#issue-reporting) flow to get issue and feature requests reported by users.