Skip to content

VSCode 设置

extensions.json

json
{
    "recommendations": [
        "kylinideteam.gitlens",
        "bradlc.vscode-tailwindcss",
        "christian-kohler.npm-intellisense",
        "codeinchinese.englishchinesedictionary",
        "dart-code.dart-code",
        "dart-code.flutter",
        "dbaeumer.vscode-eslint",
        "gruntfuggly.todo-tree",
        "humao.rest-client",
        "intellsmi.comment-translate",
        "ionutvmi.path-autocomplete",
        "jawa0919.adb-helper",
        "mhutchie.git-graph",
        "ms-ceintl.vscode-language-pack-zh-hans",
        "pflannery.vscode-versionlens",
        "redhat.vscode-xml",
        "redhat.vscode-yaml",
        "redjue.git-commit-plugin",
        "ritwickdey.liveserver",
        "streetsidesoftware.code-spell-checker",
        "vscode-icons-team.vscode-icons",
        "vue.volar",
        "xyz.local-history",
    ]
}

cs.code-snippets

{
	"add file header": {
		"prefix": "adf",
		"body": [
			"$BLOCK_COMMENT_START",
			" @FilePath     : ${RELATIVE_FILEPATH/[\\\\]/\\//g} ",
			" @Date         : $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND ",
			" @Author       : ${2:jawa0919 <jawa0919@163.com> } ",
			" @Description  : $1 ",
			"$BLOCK_COMMENT_END"
		],
		"description": "add file header"
	},
	"add file header keyboard": {
		"prefix": "adfkb",
		"body": [
			"$BLOCK_COMMENT_START",
			" ┌─────────────────────────────────────────────────────────────┐",
			" │┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐│",
			" ││Esc│!1 │@2 │#3 │\\$4 │%5 │^6 │&7 │*8 │(9 │)0 │_- │+= │|\\ │`~ ││",
			" │├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤│",
			" ││ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{[ │}] │ BS  ││",
			" │├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤│",
			" ││ Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│\" '│ Enter  ││",
			" │├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤│",
			" ││ Shift  │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│Shift │Fn ││",
			" │└─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴┬─────┴───┘│",
			" │      │Fn │ Alt │         Space         │ Alt │Win│   HHKB   │",
			" │      └───┴─────┴───────────────────────┴─────┴───┘          │",
			" └─────────────────────────────────────────────────────────────┘",
			"$BLOCK_COMMENT_END"
		],
		"description": "add file header keyboard"
	},
	"add file header sakyamuni": {
		"prefix": "adfskm",
		"body": [
			"$BLOCK_COMMENT_START",
			"",
			"                      _oo0oo_",
			"                     o8888888o",
			"                     88\" . \"88",
			"                     (| -_- |)",
			"                     0\\  =  /0",
			"                   ___/`---'\\___",
			"                 .' \\|     |// '.",
			"                / \\\\|||  :  |||// \\",
			"               / _||||| -:- |||||- \\",
			"              |   | \\\\\\  - /// |   |",
			"              | \\_|  ''\\---/''  |_/ |",
			"              \\  .-\\__  '-'  ___/-. /",
			"            ___'. .'  /--.--\\  `. .'___",
			"         .\"\" '<  `.___\\_<|>_/___.' >' \"\".",
			"        | | :  `- \\`.;`\\\\ _ /`;.`/ - ` : | |",
			"        \\  \\ `_.   \\_ __\\ /__ _/   .-` /  /",
			"    =====`-.____`.___ \\_____/___.-`___.-'=====    ",
			"                      `=---='",
			"",
			"    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      ",
			"                                                     ",
			"",
			"$BLOCK_COMMENT_END"
		],
		"description": "add file header sakyamuni"
	},
	"todo snippet": {
		"prefix": "todo",
		"body": [
			"$LINE_COMMENT TODO $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND $1"
		],
		"description": "new TODO snippet"
	},
	"fixme snippet": {
		"prefix": "fixme",
		"body": [
			"$LINE_COMMENT FIXME $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND $1"
		],
		"description": "new FIXME snippet"
	},
	"console log with filename lineNumber": {
		"scope": "javascript,typescript,javascriptreact,typescriptreact",
		"prefix": "log",
		"body": [
			"console.log($1,'$TM_FILENAME~$TM_LINE_NUMBER');"
		],
		"description": "console log snippet"
	},
	"debugPrint with filename lineNumber": {
		"scope": "dart",
		"prefix": "logd",
		"body": [
			"debugPrint('$TM_FILENAME~$TM_LINE_NUMBER: $$1');"
		],
		"description": "debugPrint snippet"
	},
	"debugPrint.error with filename lineNumber": {
		"scope": "dart",
		"prefix": "loge",
		"body": [
			"debugPrint('$TM_FILENAME~$TM_LINE_NUMBER.error: $$1');"
		],
		"description": "debugPrint.error snippet"
	},
	"newPromise snippet": {
		"scope": "dart",
		"prefix": "newPromise",
		"body": [
			"Future.sync(() async {",
			"  $1",
			"});",
		],
		"description": "dart newPromise snippet"
	},
	"setTimeout snippet": {
		"scope": "dart",
		"prefix": "setTimeout",
		"body": [
			"Future.delayed(const Duration(milliseconds: ${1:1000}), () {",
			"  $2",
			"});",
		],
		"description": "dart setTimeout snippet"
	},
	"setInterval snippet": {
		"scope": "dart",
		"prefix": "setInterval",
		"body": [
			"${3:final _timer = }Timer.periodic(const Duration(milliseconds: ${1:1000}), (timer) {",
			"  $2",
			"});",
		],
		"description": "dart setInterval snippet"
	}
}

keybindings.json

json
[
    {
        "key": "shift+f1",
        "command": "workbench.action.tasks.runTask"
    }
]

settings.json

json
{
    "workbench.iconTheme": "vscode-icons",
    "github.gitProtocol": "ssh",
    "git.confirmSync": false,
    "git.autofetch": true,
    "editor.guides.bracketPairs": true,
    "editor.linkedEditing": true,
    "editor.rulers": [
        80,
        100,
        120
    ],
    "files.eol": "\n",
    "files.associations": {
        "*.arb": "json",
        "*.config.json": "jsonc",
        "*Config.json": "jsonc"
    },
    "search.exclude": {
        "**/.git": true,
        "**/.github": true,
        "**/.history": true,
        "**/.nuxt": true,
        "**/.output": true,
        "**/.pnpm": true,
        "**/.vscode": true,
        "**/.yarn": true,
        "**/bower_components": true,
        "**/dist/**": true,
        "**/logs": true,
        "**/node_modules": true,
        "**/out/**": true,
        "**/tmp": true,
        "**/package-lock.json": true,
        "**/pnpm-lock.yaml": true,
        "**/yarn.lock": true
    },
    "cSpell.userWords": [
        "ARGB",
        "Cupertino",
        "Encrypter",
        "eruda",
        "flavorizr",
        "gitee",
        "jawa",
        "LTRB",
        "Pinia",
        "pnpm",
        "scrcpy",
        "swiper",
        "vant",
        "vite",
        "vsync",
        "writeln"
    ],
    "path-autocomplete.pathMappings": {
        "@": "${workspace}/src"
    },
    "[dart]": {
        "editor.formatOnSave": true,
        "editor.formatOnType": true,
        "editor.rulers": [
            80,
            100,
            120
        ],
        "editor.selectionHighlight": false,
        "editor.suggest.snippetsPreventQuickSuggestions": false,
        "editor.suggestSelection": "first",
        "editor.tabCompletion": "onlySnippets",
    },
    "dart.flutterCreatePlatforms": [
        "android",
        "ios",
        "web"
    ],
    "dart.flutterSdkPaths": [
        "~/.sdkHome/FlutterSdk/flutter3_32_8",
        "~/.sdkHome/FlutterSdk/flutter3_27_4",
        "~/.sdkHome/FlutterSdk/flutter3_7_12",
        "~/.sdkHome/FlutterSdk/flutter2_10_5",
        "~/.sdkHome/FlutterSdk/flutter1.22.6"
    ],
    "dart.flutterCreateOrganization": "top.meu6jia",
    "liveServer.settings.donotShowInfoMsg": true,
    "liveServer.settings.useLocalIp": true,
    "workbench.secondarySideBar.defaultVisibility": "hidden",
    "versionlens.pub.apiUrl": "https://pub-web.flutter-io.cn/api/packages",
    "commentTranslate.source": "Bing"
}

tasks.json

json
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "echo",
            "type": "shell",
            "command": "echo Hello"
        },
        {
            "label": "which flutter",
            "type": "shell",
            "command": "which flutter"
        },
        {
            "label": "flutter doctor",
            "type": "shell",
            "command": "flutter doctor -v"
        },
        {
            "label": "ios pod install",
            "type": "shell",
            "command": "cd ios && pod install --no-repo-update --verbose"
        },
        {
            "label": "example ios pod install",
            "type": "shell",
            "command": "cd example/ios && pod install --no-repo-update --verbose"
        },
        {
            "label": "flutter build apk",
            "type": "shell",
            "command": "flutter build apk --target-platform android-arm64 --split-per-abi"
        }
    ]
}