# Synapse **Repository Path**: qinrywsl/synapse ## Basic Information - **Project Name**: Synapse - **Description**: Synapse是一个基于VS Code的可视化代码智能助手。它可以即时直观地查看函数以及符号之间的调用和引用关系,支持GUI与代码之间的灵活跳转与切换,并支持关系图的动态展开与折叠,能极大地提升软件开发的效率。 - **Primary Language**: TypeScript - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-05-07 - **Last Updated**: 2026-10-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: TypeScript, JavaScript ## README # Synapse Synapse是一个基于VS Code的可视化代码智能助手。它可以即时直观地查看函数以及符号之间的调用和引用关系,支持GUI与代码之间的灵活跳转与切换,并支持关系图的动态展开与折叠,能极大地提升软件开发的效率。 ### 使用示例 #### 1. Outgoing Call Graph ![outgoing_call_graph_demo.png](./resource/outgoing.gif) #### 2. Incoming Call Graph ![incoming_call_graph_demo.png](./resource/incoming.png) ### 环境配置 Synapse使用了VS Code内置的调用层级 API(即 vscode.prepareCallHierarchy),因此它支持支持提供LSP服务的主流编程语言(Python,Java,C/C++, Rust, TypeScript/JavaScript等)。请根据你所使用的语言,安装相应的扩展插件和 LSP 服务端。 | Language | Extension | LSP server | |---|---|---| | C/C++ | [vscode-clangd](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd) / [C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) | [clangd](https://clangd.llvm.org/) / Microsoft C/C++ | | Rust | [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) | rust-analyzer | | Go | [Go](https://marketplace.visualstudio.com/items?itemName=golang.go) | [gopls](https://pkg.go.dev/golang.org/x/tools/gopls) | | Java | [Language Support for Java](https://marketplace.visualstudio.com/items?itemName=redhat.java) | Eclipse JDT | | Python | [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance) | Pylance / pylsp | 在使用之前请确保LSP Server处于活动状态。 ### GUI功能 将光标置于函数名上,然后点击右键,并在上下文菜单中选择 **Synapse**。 | Command | Description | |---|---| | **Generate Incoming Call Graph** | Shows all callers of the selected function, recursively. | | **Generate Outgoing Call Graph** | Shows all functions called by the selected function. | | **Generate Outgoing Call Tree** | Same as above, but rendered as a tree layout. | | **Generate Reference Graph** | Shows all references to the selected symbol. | 滚动鼠标,可以支持图形的放大和缩小。 ### 菜单功能 在图形中点击鼠标右键,可以支持图形中节点关系的导出功能。 | Command | Description | |---|---| | **Export Call Graph To SVG** | Saves the current graph as an SVG file. | | **Export Call Graph To CSV** | Exports the call edges as a CSV file. | | **Copy Function** | Copies the selected function name to the clipboard. | | **Copy File Path** | Copies the file path of the selected node. | | **Jump to Function** | Opens the source file at the selected function's definition. | The graph panel supports pan and zoom with the mouse. ### 插件配置 支持配置不同级别(函数/类/文件路径)的黑名单,避免不必要的冗余显示。 | Setting | Default | Description | |---|---|---| | `Synapse.callGraphFunctionBlacklist` | `["operator()"]` | Function names to exclude from all graphs. | | `Synapse.callGraphClassBlacklist` | `["std"]` | Class/namespace prefixes whose methods are excluded. | | `Synapse.callGraphPathBlacklist` | `[]` | File path prefixes to exclude (e.g. third-party or build directories). | ### 版本发布 #### 0.1.0 初始版本.