Skip to content

Conversation

@numToStr
Copy link
Owner

@numToStr numToStr commented Jul 2, 2022

It is now valid to have description for ---@field over multiple lines. But keep in mind that multiline description should come before ---@field definition

Emmy

---@class CommentConfig Plugin's configuration
---@field padding boolean Add a space b/w comment and the line
---Whether the cursor should stay at its position
---NOTE: This only affects NORMAL mode mappings and doesn't work with dot-repeat
---
---@field sticky boolean
---Lines to be ignored while comment/uncomment.
---Could be a regex string or a function that returns a regex string.
---Example: Use '^$' to ignore empty lines
---
---@field ignore string|fun():string
---@field pre_hook fun(ctx:CommentCtx):string Function to be called before comment/uncomment
---@field post_hook fun(ctx:CommentCtx) Function to be called after comment/uncomment

Help

CommentConfig                                                    *CommentConfig*
    Plugin's configuration

    Fields: ~
        {padding}    (boolean)                     Add a space b/w comment and the line
        {sticky}     (boolean)                     Whether the cursor should stay at its position
                                                   NOTE: This only affects NORMAL mode mappings and doesn't work with dot-repeat
 
        {ignore}     (string|fun():string)         Lines to be ignored while comment/uncomment.
                                                   Could be a regex string or a function that returns a regex string.
                                                   Example: Use '^$' to ignore empty lines

        {pre_hook}   (fun(ctx:CommentCtx):string)  Function to be called before comment/uncomment
        {post_hook}  (fun(ctx:CommentCtx))         Function to be called after comment/uncomment

@numToStr numToStr merged commit 9577770 into master Jul 3, 2022
@numToStr numToStr deleted the field/multi-line branch July 3, 2022 07:49
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

Successfully merging this pull request may close these issues.

2 participants