11<!--
22 * Author : OBKoro1
33 * Date : 2021-03-27 17:30:30
4- * LastEditors : OBKoro1
5- * LastEditTime : 2022-03-06 15:59:07
4+ * LastEditors : git config user.name && git config user.email
5+ * LastEditTime : 2022-05-02 18:18:00
66 * FilePath : /koro1FileHeader/CHANGELOG.md
77 * Description :
88-->
99
1010# 更新日志
11+
1112### 如果觉得本插件还不错的话,给个[ Star] ( https://github.com/OBKoro1/koro1FileHeader ) 吧~
1213
1314## 文档
1415
15- [ 配置文档] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE%E5%AD%97%E6%AE%B5 ) - 有所有功能的简介的json文件
16+ [ 配置文档] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE%E5%AD%97%E6%AE%B5 ) - 有所有功能的简介的 json 文件
1617
1718[ 配置] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE ) - 所有配置的详细描述的文档,用于查看详细介绍。
1819
20+ ### [ V4.8.22]
21+
22+ * feat: [ 新增头部注释模板` Author ` 和` LastEditors ` 从 git config中读取` user.name ` 、` user.email ` 的功能] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#author%E5%92%8Clasteditors%E8%8E%B7%E5%8F%96git-config%E9%85%8D%E7%BD%AE ) 。
23+ * feat: [ 新增版权声明获取git config配置: ` ${git_name}、${git_email}、${git_name_email} ` ] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E7%89%88%E6%9D%83%E5%A3%B0%E6%98%8E%E4%B9%9F%E6%94%AF%E6%8C%81%E8%AF%BB%E5%8F%96git-config%E9%85%8D%E7%BD%AE )
24+
25+ 配置:
26+
27+ ``` js
28+ // 头部注释模板
29+ " fileheader.customMade" : {
30+ // 获取当前项目下git config中的: 用户名、邮箱
31+ // 公司项目和个人项目可以配置不同的用户名与邮箱 搜索: gitconfig includeIf 比如: https://ayase.moe/2021/03/09/customized-git-config/
32+ " Author" : " git config user.name && git config user.email" , // 同时获取用户名与邮箱
33+ // "Author": "git config user.name", // 仅获取用户名
34+ // "Author": "git config user.email", // 仅获取邮箱
35+ // "Author": "OBKoro1", // 固定值 不从git config中获取
36+ " Date" : " Do not edit" ,
37+ // 设置后,保存文件更改默认更新最后编辑人
38+ " LastEditors" : " git config user.name && git config user.email" , // 配置规则与Author字段一致
39+ " LastEditTime" : " Do not edit" ,
40+ " FilePath" : " " ,
41+ // 个人版权声明: ${git_name} ${git_email} ${git_name_email}
42+ // 公司版权声明: 写死即可
43+ " custom_string_obkoro1_copyright" : " Copyright (c) ${now_year} by ${git_name} email: ${git_email}, All Rights Reserved. "
44+ },
45+ ```
46+
47+ 示例:
48+
49+ ``` js
50+ // "Author": "git config user.name && git config user.email"
51+ // "LastEditors": "git config user.name"
52+ // "custom_string_obkoro1_copyright": "Copyright (c) ${now_year} by ${git_name} email: ${git_email}, All Rights Reserved. "
53+ /*
54+ * Author : OBKoro1 obkoro1@foxmail.com
55+ * Date : 2022-05-01 15:35:12
56+ * LastEditors : OBKoro1
57+ * LastEditTime : 2022-05-02 11:31:09
58+ * FilePath : /fileHead/function-params/test.js
59+ * Copyright (c) 2022 by OBKoro1 email: obkoro1@foxmail.com, All Rights Reserved.
60+ */
61+ ```
62+
63+ * feat: 函数注释匹配到param 但是不需要type时 只显示param 比如: [ * ] 改成 [ ]
64+
65+ 配置:
66+
67+ ``` js
68+ " fileheader.configObj" : {
69+ " functionTypeSymbol" : " match param no type"
70+ }
71+ ```
72+
73+ 示例:
74+
75+ ``` js
76+ /**
77+ * @description : 这边匹配到param 但是没有type 正常是 [number] c [string] b
78+ * @param [] c
79+ * @param [] b
80+ * @return []
81+ */
82+ function test2 (c : number , b : string = ' 2' ) {}
83+ ```
84+
85+ * feat: 新建文件自动添加头部注释,不再自动打开。
86+ ``` js
87+ " fileheader.configObj" : {
88+ " createHeader" : false // 默认关闭 之前是true
89+ }
90+ ```
91+
92+ * feat: ` specialOptions ` 特殊字段新增` Author `
93+
94+
1995### [ V4.8.21]
2096
21- * fix: 函数注释特殊字段与函数注释等宽共同使用的问题. [ #434 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/434 )
97+ - fix: 函数注释特殊字段与函数注释等宽共同使用的问题. [ #434 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/434 )
2298
2399### [ V4.8.20]
24100
25- * feat: 多行函数参数支持选中后按函数注释快捷键自动提取
101+ - feat: 多行函数参数支持选中后按函数注释快捷键自动提取
102+
26103 1 . 鼠标左键选择多行函数声明区域,函数声明区域尽量精准
27104 2 . 按生成函数注释快捷键
28105
29106 ![ 多行函数参数自动提取参数] ( https://github.com/OBKoro1/koro1FileHeader/blob/dev/images/docs/multiLineParamsCreate.gif?raw=true )
30-
31- * fix: afterAnnotation只有一个换行,取消自动输入换行 防止换行两次 [ #430 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/430 )
32- * fix: 佛祖保佑与永不宕机之间是否多了两个空格 [ #424 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/424 )
33107
108+ - fix: afterAnnotation 只有一个换行,取消自动输入换行 防止换行两次 [ #430 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/430 )
109+ - fix: 佛祖保佑与永不宕机之间是否多了两个空格 [ #424 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/424 )
34110
35111### [ V4.8.19]
36112
37- * feat: 新增光标移动快捷键,用于函数参数填写时使用(光标移动到下一行的末尾)
113+ - feat: 新增光标移动快捷键,用于函数参数填写时使用(光标移动到下一行的末尾)
114+
38115``` js
39116// 快捷键
40117{
45122 " when" : " editorTextFocus"
46123}
47124```
125+
48126![ ] ( https://github.com/OBKoro1/koro1FileHeader/raw/dev/images/docs/param-description.gif?raw=true )
49127
50- * feat: 函数注释参数提取新增支持` tsx `
51- * feat: [ typeParamOrder] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E5%8F%82%E6%95%B0%E7%B1%BB%E5%9E%8B-%E5%92%8C-%E5%8F%82%E6%95%B0%E7%9A%84%E4%BD%8D%E7%BD%AE%E8%87%AA%E5%AE%9A%E4%B9%89 ) 支持函数参数提取只显示函数参数,不展示type类型, 关联[ #397 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/397 )
128+ - feat: 函数注释参数提取新增支持` tsx `
129+ - feat: [ typeParamOrder] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E5%8F%82%E6%95%B0%E7%B1%BB%E5%9E%8B-%E5%92%8C-%E5%8F%82%E6%95%B0%E7%9A%84%E4%BD%8D%E7%BD%AE%E8%87%AA%E5%AE%9A%E4%B9%89 ) 支持函数参数提取只显示函数参数,不展示 type 类型, 关联[ #397 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/397 )
130+
52131``` js
53132" fileheader.configObj" : {
54133 " typeParamOrder" : " param"
55134}
56135```
136+
57137``` js
58138// "typeParamOrder": "param"
59139/**
64144 * @param fileName
65145 * @return {type}
66146 */
67- export const download = async (axiosMethods , apiLink , opts , fileName ) => {};
147+ export const download = async (axiosMethods , apiLink , opts , fileName ) => {}
68148```
69149
70- * docs: 文档更新。
71- * fix: 修复箭头函数参数的提取错误, 关联[ #394 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/394 )
72-
150+ - docs: 文档更新。
151+ - fix: 修复箭头函数参数的提取错误, 关联[ #394 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/394 )
73152
74153### [ V4.8.18]
75154
76- * feat: ` FilePath ` 新增` only file name without ext ` [ 取消文件名后缀] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#filepath%E6%96%87%E4%BB%B6%E7%9B%B8%E5%AF%B9%E4%BA%8E%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%B7%AF%E5%BE%84 )
77- * feat: 函数注释关键字` param ` 和` return ` 为[ 特殊字段可自定义] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#6-%E7%89%B9%E6%AE%8A%E5%AD%97%E6%AE%B5%E5%85%81%E8%AE%B8%E8%87%AA%E5%AE%9A%E4%B9%89 ) [ #377 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/377 )
155+ - feat: ` FilePath ` 新增` only file name without ext ` [ 取消文件名后缀] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#filepath%E6%96%87%E4%BB%B6%E7%9B%B8%E5%AF%B9%E4%BA%8E%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%B7%AF%E5%BE%84 )
156+ - feat: 函数注释关键字` param ` 和` return ` 为[ 特殊字段可自定义] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#6-%E7%89%B9%E6%AE%8A%E5%AD%97%E6%AE%B5%E5%85%81%E8%AE%B8%E8%87%AA%E5%AE%9A%E4%B9%89 ) [ #377 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/377 )
78157
79158``` js
80159" fileheader.configObj" : {
@@ -85,14 +164,14 @@ export const download = async (axiosMethods, apiLink, opts, fileName) => {};
85164}
86165// 效果
87166/**
88- * description:
167+ * description:
89168 * param2 [type] 字段重命名
90169 * return2 [type] 字段重命名
91170 */
92171function test (a , b ) {}
93172```
94173
95- * feat: [ 自定义语言支持函数参数提取] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%AD%E8%A8%80%E6%94%AF%E6%8C%81%E5%87%BD%E6%95%B0%E5%8F%82%E6%95%B0%E6%8F%90%E5%8F%96 )
174+ - feat: [ 自定义语言支持函数参数提取] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%AD%E8%A8%80%E6%94%AF%E6%8C%81%E5%87%BD%E6%95%B0%E5%8F%82%E6%95%B0%E6%8F%90%E5%8F%96 )
96175
97176``` js
98177" fileheader.configObj" : {
@@ -126,13 +205,13 @@ const supportLanguage = {
126205 c: ' function-c.js' ,
127206 cpp: ' function-c.js' ,
128207 php: ' function-php.js' ,
129- solidity: ' function-solidity.js' // 智能合约的语言
208+ solidity: ' function-solidity.js' , // 智能合约的语言
130209}
131210```
132211
133- * feat: 支持` solidity ` 智能合约语言 [ #365 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/365 )
212+ - feat: 支持` solidity ` 智能合约语言 [ #365 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/365 )
134213
135- ps: vscode本身不支持 ` solidity ` ,需要安装` solidity ` 插件来支持该语言,而后才能开启函数注释。
214+ ps: vscode 本身不支持 ` solidity ` ,需要安装` solidity ` 插件来支持该语言,而后才能开启函数注释。
136215
137216``` js
138217/**
@@ -145,39 +224,38 @@ function multiply(uint256 x, uint256 y) returns (uint256 z) {
145224 z = x * y;
146225}
147226```
148- * fix: C++函数注释无法提取带有引用符号&的参数 [ #379 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/379 )
149- * fix: 修复文档错误。
150- * fix: 修复` Ubuntu ` 下的快捷键: ` ctrl+super+i ` 、` ctrl+super+t `
151- * fix: 修复` functionParamsShape ` 为` no type ` 时,函数注释` return ` 返回值出错的问题 [ #382 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/382 ) 。
152- * fix: 修复文件未保存到系统中,就进行读取diff,导致diff重置不准的问题
227+
228+ - fix: C++函数注释无法提取带有引用符号&的参数 [ #379 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/379 )
229+ - fix: 修复文档错误。
230+ - fix: 修复` Ubuntu ` 下的快捷键: ` ctrl+super+i ` 、` ctrl+super+t `
231+ - fix: 修复` functionParamsShape ` 为` no type ` 时,函数注释` return ` 返回值出错的问题 [ #382 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/382 ) 。
232+ - fix: 修复文件未保存到系统中,就进行读取 diff,导致 diff 重置不准的问题
153233
154234### [ V4.8.17]
155235
156- * feat: [ throttleTime节流时间自定义 ] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E8%8A%82%E6%B5%81%E6%97%B6%E9%97%B4%E8%87%AA%E5%AE%9A%E4%B9%89-%E8%87%AA%E5%AE%9A%E4%B9%89%E5%90%8C%E4%B8%80%E4%B8%AA%E6%96%87%E4%BB%B6%E8%A7%A6%E5%8F%91%E4%BF%9D%E5%AD%98%E7%9A%84%E9%A2%91%E7%8E%87 ) , 自定义同一个文件触发保存的频率。
236+ - feat: [ throttleTime 节流时间自定义 ] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E8%8A%82%E6%B5%81%E6%97%B6%E9%97%B4%E8%87%AA%E5%AE%9A%E4%B9%89-%E8%87%AA%E5%AE%9A%E4%B9%89%E5%90%8C%E4%B8%80%E4%B8%AA%E6%96%87%E4%BB%B6%E8%A7%A6%E5%8F%91%E4%BF%9D%E5%AD%98%E7%9A%84%E9%A2%91%E7%8E%87 ) , 自定义同一个文件触发保存的频率。
157237
158238``` js
159239" fileheader.configObj" : {
160240 " throttleTime" : 60000 // 对同一个文件 需要过1分钟再次修改文件并保存才会更新注释
161241}
162242```
163243
164- 一个文件第一次修改内容并保存后,会触发更新注释的最后编辑人,最后编辑时间。
244+ 一个文件第一次修改内容并保存后,会触发更新注释的最后编辑人,最后编辑时间。
165245
166- 之后在该文件上进行修改,并且再次保存后,是否更新注释,取决于` throttleTime ` 所设定的时间。
246+ 之后在该文件上进行修改,并且再次保存后,是否更新注释,取决于` throttleTime ` 所设定的时间。
167247
168- 当:(当前时间 - 上次执行事件 > throttleTime设定的时间 ),即触发更新注释函数。
248+ 当:(当前时间 - 上次执行事件 > throttleTime 设定的时间 ),即触发更新注释函数。
169249
170- PS:插件会保存最近30个文件的最后更新注释的时间,并使用LRU算法 ,在每次更新注释后,会将该文件更新成最新的。
250+ PS:插件会保存最近 30 个文件的最后更新注释的时间,并使用 LRU 算法 ,在每次更新注释后,会将该文件更新成最新的。
171251
252+ 这个配置的意义在于,通过减少触发更新注释的方式,降低撤销更改重新保存后,导致被撤销内容被注释的更新所覆盖的问题 [ #358 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/358 ) 。
172253
173- 这个配置的意义在于,通过减少触发更新注释的方式,降低撤销更改重新保存后,导致被撤销内容被注释的更新所覆盖的问题 [ #358 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/358 ) 。
174-
175-
176- * fix: c++ 参数去掉关键字` ['const', 'struct'] ` [ #349 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/349 ) 、[ #325 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/325 )
254+ - fix: c++ 参数去掉关键字` ['const', 'struct'] ` [ #349 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/349 ) 、[ #325 ] ( https://github.com/OBKoro1/koro1FileHeader/issues/325 )
177255
178256``` c++
179257/* *
180- * @description:
258+ * @description:
181259 * @param t2 [my_type]
182260 * @param str [string]
183261 * @param str2 [string]
@@ -191,8 +269,8 @@ void test(struct my_type t2, const std::string str, const std::string str2, stru
191269
192270### [V4.8.16]
193271
194- * fix: 修复getColon 获取@没有置空的问题
195- * fix: 修复头部注释最后编辑人和最后编辑时间冒号使用错误的问题
272+ - fix: 修复 getColon 获取@没有置空的问题
273+ - fix: 修复头部注释最后编辑人和最后编辑时间冒号使用错误的问题
196274
197275### [V4.8.15]
198276
@@ -971,7 +1049,7 @@ function test(a, b) {
9711049
9721050### [ V4.0.0]
9731051
974- - ** 自定义注释中的` @ ` 和` : ` ** :允许全局修改` @ ` 和` : ` ,和单独为某些文件修改它们,[ 配置] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%B3%A8%E9%87%8A%E4%B8%AD%E7%9A%84%E8%89%BE%E7%89%B9%E5%92%8C%E5%86%92%E5%8F%B7 ) 。
1052+ - ** 自定义注释中的` @ ` 和` : ` ** :允许全局修改` @ ` 和` : ` ,和单独为某些文件修改它们,[ 配置] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%B3%A8%E9%87%8A%E4%B8%AD%E7%9A%84%E8%89%BE%E7%89%B9%E5%92%8C%E5%86%92%E5%8F%B7 ) 。
9751053
9761054- ** 自动添加注释,现在改为默认打开** :自动添加头部注释功能现在比较稳定,应该很多同学不知道这个能力,反正我非常喜欢用!不喜欢的话也可以这样关闭它:
9771055
@@ -984,7 +1062,7 @@ function test(a, b) {
9841062- ** 破坏性修改** :由于配置选项对象会被覆盖,导致默认配置不生效,** 将` fileheader.configObj.config ` 移除,并将以下三个选项移动到` fileheader.configObj ` 中**
9851063
9861064 - ` prohibitAutoAdd ` :[ 自动添加头部注释黑名单] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E8%87%AA%E5%8A%A8%E6%B7%BB%E5%8A%A0%E5%A4%B4%E9%83%A8%E6%B3%A8%E9%87%8A%E9%BB%91%E5%90%8D%E5%8D%95 )
987- - ` dateFormat ` :[ 时间格式化] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E6%97%B6%E9%97%B4%E6%A0%BC%E5%BC%8F%E5%8C%96 ) , 使用` moment ` 的 format 方法
1065+ - ` dateFormat ` :[ 时间格式化] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E6%97%B6%E9%97%B4%E6%A0%BC%E5%BC%8F%E5%8C%96 ) , 使用` moment ` 的 format 方法
9881066 - ` moveCursor ` :[ 移动光标到` Description ` ] ( https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE#%E7%A7%BB%E5%8A%A8%E5%85%89%E6%A0%87%E5%88%B0description-%E6%89%80%E5%9C%A8%E8%A1%8C )
9891067
9901068``` js
0 commit comments