Skip to content

不同文件后缀提供specialOptions字段 #539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aqshing opened this issue Dec 26, 2022 · 1 comment
Closed

不同文件后缀提供specialOptions字段 #539

aqshing opened this issue Dec 26, 2022 · 1 comment

Comments

@aqshing
Copy link

aqshing commented Dec 26, 2022

您好,非常荣幸使用您的插件,在此致以诚挚的感激。
在使用您的插件的过程中,我想提一个新需求,请帮忙评审一下。
就是针对不同的文件后缀提供一个specialOptions字段,这样使用体验会更加友好。
image

@OBKoro1
Copy link
Owner

OBKoro1 commented Jan 29, 2023

更新插件,该特性已支持,觉得插件不错的话,点个Star吧~ ❤️

[V4.9.3]

  • feat: specialOptions支持单独根据语言或者语言后缀进行配置,参考自定义语言的后缀形式 #539, 文档:特殊字段允许自定义

如下面的js、md,会针对后缀文件进行单独的特殊字段设置。

"fileheader.configObj": {
  "specialOptions":{
    "Author": "creater",
    "Date": "since",
    "LastEditTime": "lastTime",
    "LastEditors": "LastAuthor",
    "Description": "message", // 头部注释大写的描述Description
    "description": "function message", // 函数注释小写的描述:description
    "FilePath": "文件相对于项目的路径"
    "param": "param2", // 函数注释parm参数别名
    // 文件后缀、或者语言后缀,可针对单个文件后缀进行配置:language的自定义语言配置
    "js": {
        "Description": "message2",  // 合并specialOptions第一层级的配置,覆盖Description的配置
        "return": "return2", // 单独为js文件添加return 特殊字段配置
    },
    "md": {
      "Date": "date",
      "Description": "tag"
    }
  }
}

@OBKoro1 OBKoro1 closed this as completed Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants