add vscode config to support extension development

Signed-off-by: ChengZi <chen.zhang@zilliz.com>
This commit is contained in:
ChengZi
2025-06-23 20:37:47 +08:00
committed by Cheney Zhang
parent 18977a3e99
commit b651855bd9
6 changed files with 108 additions and 2 deletions

10
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner",
"ms-vscode.vscode-typescript-next",
"ms-vscode.vscode-json"
]
}

34
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,34 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode-extension"
],
"outFiles": [
"${workspaceFolder}/packages/vscode-extension/dist/**/*.js"
],
"preLaunchTask": "npm: webpack:dev - packages/vscode-extension"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode-extension",
"--extensionTestsPath=${workspaceFolder}/packages/vscode-extension/dist/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/packages/vscode-extension/dist/test/**/*.js"
],
"preLaunchTask": "npm: webpack:dev - packages/vscode-extension"
}
]
}

26
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,26 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/node_modules": true,
"**/dist": false,
"**/out": false
},
"search.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/out": true
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"typescript.preferences.includePackageJsonAutoImports": "on",
// ESLint settings
"eslint.workingDirectories": [
"packages/vscode-extension",
"packages/core"
],
// Format on save
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}

36
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,36 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "webpack:dev",
"path": "packages/vscode-extension/",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "webpack",
"path": "packages/vscode-extension/",
"group": "build",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": "$tsc"
}
]
}