Vscode function comment plug-in koroFileHeader

In the development process, it is a good habit to write comments casually. Only by re-reading the code after a few years can you quickly understand the function of a function and improve the readability of the code. The following is the koroFileHeaderinstallation and use of vscode. Record it here

1. Search and install koroFileHeader

insert image description here

2. Open the configuration item

Access method 1:
insert image description here
Access method 2:
insert image description here

3. Search for fileheader in setting, open the configuration item Cursor Mode

insert image description here

4. Add configuration items

See github for more configuration options
insert image description here

    "fileheader.cursorMode": {
    
     // 函数配置项
        "description": "", // 功能描述
        "param": "", // 传入参数
        "return": "", // 返回结果
    },

5. Use

After writing the function, use shortcut keys in the function name ctrl+win+tto generate a function description template and add relevant function content
insert image description here
If you do not want to generate header comments, you can configure as follows
insert image description here

6. Effect

When calling this function, move the mouse to the function name, and the relevant function description will be displayed
insert image description here

Guess you like

Origin blog.csdn.net/skybulex/article/details/129313895