Skip to content

Minor issue for warning diagnostics on .setup({...}) with only one non default field #498

@pitoniak32

Description

@pitoniak32

I am just setting a pre_hook option, to override the default nil. But the lua diagnostics are warning about Missing required fields in type CommentConfig.

The docs mention that this should be merged with the default config, I'm wondering if there needs to be a DTO type that marks those fields as optional for the setup function options so they can be merged without warnings. Im not to familiar with lua types though 😅

Following are the default config for the setup(). If you want to override, just modify the option that you want then it will be merged with the default config. Read :h comment.config for more info.

Screenshot 2024-12-05 at 9 11 52 AM

If this would be a medium difficulty fix I would be willing to make a PR if your are accepting contributions!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions