Skip to content

Instantly share code, notes, and snippets.

@HillLiu
Created July 2, 2025 08:00
Show Gist options
  • Save HillLiu/ef2bdbc8b6917792e43baeea4d99e60d to your computer and use it in GitHub Desktop.
Save HillLiu/ef2bdbc8b6917792e43baeea4d99e60d to your computer and use it in GitHub Desktop.
commit c28431fdccee29da35d75d5e2b52449124935077
Author: Hill <[email protected]>
Date: Wed Jul 2 15:57:55 2025 +0800
refactor: update problem matcher in tasks.json for improved error handling; add .vscodeignore to exclude unnecessary files; modify build scripts in package.json for better bundling
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index a40c7e4..8fffe92 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -4,7 +4,23 @@
{
"type": "npm",
"script": "watch",
- "problemMatcher": "$tsc-watch",
+ "problemMatcher": {
+ "owner": "bun",
+ "fileLocation": ["relative", "${workspaceFolder}"],
+ "pattern": {
+ "regexp": "^(.*):(\\d+):(\\d+):\\s+(error|warning):\\s+(.*)$",
+ "file": 1,
+ "line": 2,
+ "column": 3,
+ "severity": 4,
+ "message": 5
+ },
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": "^.*bun build.*$",
+ "endsPattern": "^.*Bundled \\d+ modules.*$"
+ }
+ },
"isBackground": true,
"presentation": {
"reveal": "silent"
diff --git a/.vscodeignore b/.vscodeignore
new file mode 100644
index 0000000..eec4396
--- /dev/null
+++ b/.vscodeignore
@@ -0,0 +1,31 @@
+# Source files (we include the compiled 'out' folder instead)
+src/**
+**/*.ts
+!out/**/*.js
+
+# Development and build files
+tsconfig.json
+bun.lock
+.gitignore
+.git/**
+node_modules/**
+**/*.test.*
+**/__tests__/**
+
+# Documentation and development files (keep README.md and LICENSE.md)
+docs/**
+*.md
+!README.md
+!LICENSE.md
+
+# Build artifacts and cache
+.build/**
+*.tsbuildinfo
+*.log
+
+# IDE files
+.vscode/**
+.idea/**
+
+# Miscellaneous
+*.vsix
diff --git a/package.json b/package.json
index b5a8eff..f25c494 100644
--- a/package.json
+++ b/package.json
@@ -86,11 +86,12 @@
"scripts": {
"build:vscode": "bunx vsce package",
"build:clean": "find ./out -name '*.*' | xargs rm -rf",
- "build:src": "bunx tsc -p ./",
+ "build:src": "bun build src/extension.ts --outdir out --format cjs --target node --external vscode --external @valibot/to-json-schema --external sury --external effect --minify",
+ "build:dev": "bun build src/extension.ts --outdir out --format cjs --target node --external vscode --external @valibot/to-json-schema --external sury --external effect --sourcemap=inline --watch",
"build": "bun build:clean && bun build:src",
"install:vscode": "code --install-extension ./vscode-expose-*.vsix",
"install": "bun run build && bun build:vscode && bun install:vscode",
- "watch": "bunx tsc -w -p ./",
+ "watch": "bun build:dev",
"test": "bun test",
"prepublishOnly": "npm run test"
},
@@ -99,6 +100,7 @@
"types",
"package.json",
"README.md",
- "src"
+ "LICENSE.md",
+ "out"
]
}
@HillLiu
Copy link
Author

HillLiu commented Jul 2, 2025

  • _executeCodeActionProvider:執行程式碼動作提供者。
  • _executeCodeLensProvider:執行程式碼鏡頭提供者。
  • _executeHoverProvider:執行懸停提供者。
  • _executeHoverProvider_recursive:遞迴執行懸停提供者。
  • editor.gotoNextSymbolFromResult:跳轉到下一個符號結果。
  • editor.gotoNextSymbolFromResult.cancel:取消跳轉到下一個符號結果。
  • _executeDefinitionProvider:執行定義提供者。
  • _executeDefinitionProvider_recursive:遞迴執行定義提供者。
  • _executeTypeDefinitionProvider:執行類型定義提供者。
  • _executeTypeDefinitionProvider_recursive:遞迴執行類型定義提供者。
  • _executeDeclarationProvider:執行宣告提供者。
  • _executeDeclarationProvider_recursive:遞迴執行宣告提供者。
  • _executeReferenceProvider:執行參考提供者。
  • _executeReferenceProvider_recursive:遞迴執行參考提供者。
  • _executeImplementationProvider:執行實作提供者。
  • _executeImplementationProvider_recursive:遞迴執行實作提供者。
  • _executeInlayHintProvider:執行內嵌提示提供者。
  • _executeDocumentColorProvider:執行文件顏色提供者。
  • _executeColorPresentationProvider:執行顏色呈現提供者。
  • _executeFoldingRangeProvider:執行摺疊範圍提供者。
  • _executeFormatRangeProvider:執行格式化範圍提供者。
  • _executeFormatDocumentProvider:執行格式化文件提供者。
  • _executeFormatOnTypeProvider:執行輸入時格式化提供者。
  • _executeDocumentSymbolProvider:執行文件符號提供者。
  • _executeCompletionItemProvider:執行完成項目提供者。
  • _executeLinkedEditingProvider:執行連結編輯提供者。
  • _executeLinkProvider:執行連結提供者。
  • _executeSignatureHelpProvider:執行簽名幫助提供者。
  • _executeDocumentRenameProvider:執行文件重新命名提供者。
  • _executePrepareRename:執行準備重新命名。
  • _executeSelectionRangeProvider:執行選取範圍提供者。
  • _executeDocumentHighlights:執行文件高亮。
  • _executePrepareCallHierarchy:執行準備呼叫層級。
  • _executeProvideIncomingCalls:執行提供傳入呼叫。
  • _executeProvideOutgoingCalls:執行提供傳出呼叫。
  • _executePrepareTypeHierarchy:執行準備類型層級。
  • _executeProvideSupertypes:執行提供超類型。
  • _executeProvideSubtypes:執行提供子類型。
  • editor.action.accessibleViewGoToSymbol:在可訪問視圖中跳轉到符號。
  • _executeDataToNotebook:執行數據到筆記本轉換。
  • _executeNotebookToData:執行筆記本到數據轉換。
  • chat.inlineSymbolAnchor.goToDefinition:聊天內聯符號錨點跳轉到定義。
  • chat.inlineSymbolAnchor.goToTypeDefinitions:聊天內聯符號錨點跳轉到類型定義。
  • chat.inlineSymbolAnchor.goToImplementations:聊天內聯符號錨點跳轉到實作。
  • chat.inlineSymbolAnchor.goToReferences:聊天內聯符號錨點跳轉到參考。
  • notebook.execute:執行筆記本。
  • notebook.cell.execute:執行筆記本單元格。
  • notebook.cell.executeCellsAbove:執行上方單元格。
  • notebook.cell.executeCellAndBelow:執行單元格和下方單元格。
  • notebook.cell.executeAndFocusContainer:執行並聚焦容器。
  • notebook.cell.executeAndSelectBelow:執行並選取下方。
  • notebook.cell.executeAndInsertBelow:執行並在下方插入。
  • notebook.outline.toggleCodeCellSymbols:切換程式碼單元格符號大綱。
  • _executeInlineValueProvider:執行內聯值提供者。
  • workbench.action.gotoSymbol:跳轉到工作台符號。
  • interactive.execute:執行互動式。
  • repl.execute:執行REPL。
  • workbench.action.showAllSymbols:顯示所有工作台符號。
  • _executeWorkspaceSymbolProvider:執行工作區符號提供者。
  • _executeNotebookVariableProvider:執行筆記本變數提供者。
  • workbench.views.extensions.workspaceRecommendations.open:打開工作區擴展建議。
  • workbench.views.extensions.workspaceRecommendations.focus:聚焦工作區擴展建議。
  • workbench.views.extensions.workspaceRecommendations.resetViewLocation:重置工作區擴展建議視圖位置。
  • _copilot.workspaceIndex.signInToAnything:Copilot工作區索引登入。
  • _copilot.workspaceIndex.signInAgain:Copilot工作區索引重新登入。
  • vscode-expose.diagnoseSymbols:診斷符號。
  • _github.copilot.openSymbolInFile:在文件中打開Copilot符號。
  • _github.copilot.openSymbolFromReferences:從參考中打開Copilot符號。
  • github.copilot.executeSearch:Copilot執行搜尋。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment