Skip to content

Disable automatic insertion of "---@" on EnterΒ #2861

Open
@swajj

Description

@swajj

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Annotations, Completion, Formatting

Expected Behaviour

When I hit Enter at the end of a class/parameter/etc. annotation, I get a new blank line.

Actual Behaviour

When I type an annotation and hit Enter, I get ---@ automatically inserted.

Reproduction steps

  1. Type ---@class test
  2. Press Enter

Additional Notes

I know this is an "intentional feature", but I would like a way to disable it. There is no setting that disables this (and only this) - turning "Editor: Auto Indent" to 'brackets' or lower disables this unwanted behavior, but then I lose auto-indent.

See #2786

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions