lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

Disable automatic insertion of "---@" on Enter

Open swajj opened this issue 1 year ago • 5 comments

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 https://github.com/LuaLS/lua-language-server/discussions/2786

Log File

No response

swajj avatar Sep 20 '24 00:09 swajj