Skip to content

Commit 3e7a33a

Browse files
更新文档中的图片url地址
1 parent c02679a commit 3e7a33a

File tree

7 files changed

+31
-31
lines changed

7 files changed

+31
-31
lines changed

docs/manual/Feature.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,45 +18,45 @@
1818
## Feature Detail
1919
### Defintion Find/定义跳转 <a id="DefintionFind"></a>
2020
**支持局部、全局文件定义查询跳转**
21-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/GotoDefinition.gif)
21+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/GotoDefinition.gif)
2222

2323
### Find All References/引用查找 <a id="FindAllReferences"></a>
2424
**支持基于作用域的各类型引用查找**
25-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/FindReferences.gif)
25+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/FindReferences.gif)
2626

2727
### Document Symbols/文件符号表查询 <a id="DocumentSymbols"></a>
2828
**支持文件域符号表查询,在搜索栏输入@**
29-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/DocmentSymbol.gif)
29+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/DocmentSymbol.gif)
3030

3131
### Workspace Symbols/工程符号表查询 <a id="WorkspaceSymbols"></a>
3232
**支持工程域符号表查询,在搜索栏输入#**
33-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/WorkspaceSymbol.gif)
33+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/WorkspaceSymbol.gif)
3434

3535
### Auto Code Completion/自动代码补全 <a id="AutoCodeCompletion"></a>
3636
**支持变量、函数的自动输入提示**
37-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/CodeCompletion.gif)
37+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/CodeCompletion.gif)
3838

3939
### Format Code/代码格式化 <a id="FormatCode"></a>
4040
**支持代码格式化**
41-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/Format.gif)
41+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/Format.gif)
4242

4343
### Hover/代码悬停 <a id="Hover"></a>
4444
**支持代码悬停提示**
45-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/Hover.gif)
45+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/Hover.gif)
4646

4747
### Hightlight Global Var/全局变量着色 <a id="HightlightGlobalVar"></a>
4848
**支持全局变量高亮着色**
49-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/GlobalColor.gif)
49+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/GlobalColor.gif)
5050

5151
### Syntax Check/语法检测 <a id="SyntaxCheck"></a>
5252
**提供丰富的语法错误检测类型**
53-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/SyntaxCheck.gif)
53+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/SyntaxCheck.gif)
5454

5555
### Semantic Check/语义检测 <a id="SemanticCheck"></a>
5656
**支持多种类型的语义检测**
57-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/SemanticCheck.gif)
57+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/SemanticCheck.gif)
5858

5959
### Quick Analysis/快速增量分析 <a id="QuickAnalysis"></a>
6060
**支持增量变化分析,分析结果诊断输出**
61-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/RealTimeCheck.gif)
61+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/RealTimeCheck.gif)
6262

docs/manual/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ a = a and false -- and表达式右边包含false,表达式结果始终为fal
135135
由于Lua需要调用到C或是其他语言导入的符号,这些导入的符号是未定义的,因此需要忽略这些符号的告警。有时,也需要屏蔽分析的文件夹或文件,忽略指定的文件的告警等,这些都需要特定的配置文件。
136136

137137
配置文件的名字是固定的:luahelper.json,在vscode工程目录下。这样有利于一个项目组共用一份相同的配置文件,配置文件也放在项目的git或是svn管理。
138-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/json.png)
138+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/json.png)
139139

140140
配置文件的格式是json的,文件名为:luahelper.json,完整的配置格式如下:
141141
```json

docs/manual/debugPrinciple.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## 调试器协议
44
调试器的实现采用了微软推出的[Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/),它把开发工具(IDE或Iditor)与不同语言的debugger功能解耦, 并把两者之间的通信的方式抽象为通用协议(JSON格式)。通过调试适配器协议,可以为开发工具实现通用调试器,该调试器可以通过调试适配器与不同的调试器进行通信。调试适配器可以在多个开发工具中重复使用,从而大大减少了在不同工具中支持新调试器的工作。
55

6-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/debugprinciple.png)
6+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/debugprinciple.png)
77

88

99
调试的过程涉及了三个角色:
@@ -19,7 +19,7 @@
1919
## 实现架构
2020
LuaPanda调试的架构采用了attach请求模式,attach的作用是附加到运行Lua代码的可执行程序上,调试器前端VSCode工程与运行的lua进程(被调试的进程)通过socket通信。下图是LuaHelper集成了LuaPanda调试模块后的调试架构图。
2121

22-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/debugstruct.png)
22+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/debugstruct.png)
2323

2424
整个调试功能分为两大主体:
2525
* VSCode打开的Lua工程:上图中左边框。

docs/manual/debugsinglefile.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
### 2调试配置
66
首先需要设置调试配置,调试配置参考前文。然后选择下图中LuaHelper-DebugFile选项
7-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/debugfile.png)
7+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/debugfile.png)
88

99

1010
### 3调试单个文件
1111
调试选项切换LuaPanda-DebugFile, 代码编辑窗口切换到待调试文件,按F5快捷键进行调试。这种模式下,不用引入LuaPanda.lua文件和luasocket库。
1212

13-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/debugfilerun.png)
13+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/debugfilerun.png)
1414

1515

1616
### 4单文件运行
1717
调试选项切换LuaPanda-DebugFile, 代码编辑窗口切换到待运行的文件,按ctrl + F5 快捷键运行lua文件。。这种模式下,也不用引入LuaPanda.lua文件和luasocket库。
1818

19-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/runonefile.gif)
19+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/runonefile.gif)

docs/manual/debuguse.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#### 2.1 在VSCode 设置setting.json内容
1414
打开setting.json的方式:
1515

16-
![avatar](https://https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/Proxys.gif)
16+
![avatar](https://https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/Proxys.gif)
1717

1818
填写go的环境,还需要设置代理(方便安装go的一些扩展工具),下面是我的一些设置:
1919

@@ -30,13 +30,13 @@
3030
#### 2.2 VSCode安装go的插件
3131
在插件市场搜索Go,安装排名第一的插件即可
3232

33-
![avatar](https://https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/go.png)
33+
![avatar](https://https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/go.png)
3434

3535
#### 2.3 VSCode打开luahelper-lsp目录,按F5调试即可
3636

3737
#### 2.4 设置插件前端连接Go后端
3838
插件前端与插件后端协议的格式Json RPC,如下图所示
39-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/running.png)
39+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/running.png)
4040

4141
插件前端连接后端有两种方式:
4242
* a) 通过管道的方式,插件前端直接拉取后端exe程序
@@ -45,7 +45,7 @@
4545
为了使插件前端通过socket连接的后端,前端插件的设置如下:
4646
(选设置-》Lua Helper—》 Project:Lsp (勾选socket rpc)
4747

48-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/socket.png)
48+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/socket.png)
4949

5050

5151
#### 2.5 VSCode重新打开Lua工程

docs/manual/source.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66

77
早期,没有LSP协议,如果要为语言编写不同编辑器下的插件,每种编辑器下都需要单独开发。
8-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/Nolsp.png)
8+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/Nolsp.png)
99

1010
后面,微软推出了LSP协议,把插件的开发分为前端和后端,后端可以使用其他语言,且可以适配不同的前端。那么不同编辑器下插件,可以利用同一个后端,极大的减少插件的开发量。同时,插件的后端可以采用任何语言,不局限于前端的语言。前端与后端通信,采用Json协议格式。如下图所示。
11-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/Lsp.png)
11+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/Lsp.png)
1212

1313
## 2 源码介绍
1414
本插件,前端是利用Typescript语言,后端是采用Go语言。
1515
源码目录如下:
16-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/src.png)
16+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/src.png)
1717

1818
luahelper-lsp目录,是后端go程序目录。</br>
1919
luahelper-vscode目录,是前端typescript程序目录。
@@ -28,7 +28,7 @@ luahelper-vscode目录,是前端typescript程序目录。
2828
如果是mac环境,会编译出lualsp, 二进制更改名称为: maclualsp</br>
2929
* **c) 把编译出来的go二进制(总共三个环境二进制),拷贝到插件前端目录中:**</br>
3030
..\LuaHelper\luahelper-vscode\server ,目录如下图所示:
31-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/clientexe.png)
31+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/clientexe.png)
3232
* **d) 前端插件编译的时候,会把..\LuaHelper\luahelper-vscode\server目录下的二进制打包到插件中。**</br>
3333
插件运行时,会根据不同的平台加载相应的二进制执行。
3434

docs/manual/usedebug.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
### 1.1 生成调试配置
55
点击VSCode调试状态栏,若没有创建过launch.json文件,主动创建launch.json,在弹出框中选择LuaHelper:debug。会自动生成对应的LuaHelper调试配置文件launch.json。
66

7-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/launch.png)
7+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/launch.png)
88

99

1010
生成的调试配置文件launch.json里面包含了两种调试方式:
1111
* LuaHelper-Attach:通过attach的方式调试其他的执行进程。
1212
* LuaHelper-DebugFile:表示调试和运行单个lua文件。
1313

14-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/debugways.png)
14+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/debugways.png)
1515

1616
### 1.2 添加调试配置
1717
点击VSCode调试状态栏,已经创建过lanuch.json文件,但是调试的方式不包括LuaHelper-Attach和LuaHelper-DebugFile,需要快捷添加调试配置。
1818
快捷添加的方式:点击Add Configuration按钮,快捷输入LuaHelper,选择LuaHelper-Attach和LuaHelper-DebugFile。
1919

20-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/debugsetting.gif)
20+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/debugsetting.gif)
2121

2222

2323
### 1.3 调试项说明
2424
launch.json 配置项中要修改的主要是luaFileExtension, 改成lua文件使用的后缀就行(比如xlua框架改为lua.txt, slua框架改为txt)。
2525

26-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/debugsuffix.png)
26+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/debugsuffix.png)
2727

2828
## 2引入LuaPanda.lua文件
2929
调试需要引入LuaPanda.lua与前端VScode Lua工程进行socket通信,且LuaHelper.lua会直接引入luasocket网络库。目前lua框架: slua, slua-unreal, xlua 都已集成 luasocket网络库。
@@ -36,7 +36,7 @@ launch.json 配置项中要修改的主要是luaFileExtension, 改成lua文件
3636
**打开快捷方式:**</br>
3737
快捷键:ctrl + shift + p, 然后输入LuaHelper,会提示下面列的快捷命令:
3838

39-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/shortcutcmd.png)
39+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/shortcutcmd.png)
4040

4141
+ LuaHelper: Open Debug Foder,表示打开插件自带的关键目录(里面包含LuaPanda.lua和luasocket库)。</br>
4242
+ LuaHelper: Copy debug file to workspace, 表示把LuaPanda.lua文件拷贝到项目中指定的目录,需要手动指定目标目录。</br>
@@ -50,7 +50,7 @@ launch.json 配置项中要修改的主要是luaFileExtension, 改成lua文件
5050
* VSCode前端工程按F5启动调试,等待运行lua代码的进行通过引入LuaPanda.lua文件连接上。
5151
* Lua代码工程进程开始运行,连接VSCode前端工程。
5252

53-
![avatar](https://raw.githubusercontent.com/yinfei8/LuaHelper/master/images/debug/begindebug.png)
53+
![avatar](https://raw.githubusercontent.com/Tencent/LuaHelper/master/images/debug/begindebug.png)
5454
s
5555
## 4各种框架下使用调试
5656
### slua框架调试

0 commit comments

Comments
 (0)