VSC: disable automatic annotation prefix on new lines, indentation jank? #2786
Replies: 5 comments 7 replies
-
Seems like setting "Editor: Auto Indent" to one of the settings that doesn't have "invoke onEnterRules" removes the |
Beta Was this translation helpful? Give feedback.
-
I also noticed this behavior, and I think this is added recently in LuaLS v3.10.0. From the change log
I also found this a bit annoying, or not as smart enough. ---@class Test
local Test = {} without adding other annotation line in between. I've yet found an option to disable it |
Beta Was this translation helpful? Give feedback.
-
I haven't tried it, but the indentation issue appears to have been worked on in 16a7c65 . |
Beta Was this translation helpful? Give feedback.
-
Can confirm that turning "Editor: Auto Indent" to 'brackets' or lower disables this unwanted behavior, but then I lose auto-indent after e.g. I was also able to fix it by reverting all the way to 3.9.3. To be honest, the new auto-insertion of |
Beta Was this translation helpful? Give feedback.
-
Honestly I'm not sure if this is was caused by a VS Code update or an LLS one, but since a few days ago, starting a new line after writing an annotation causes the
---@
prefix to be automatically added, which is incredibly frustrating as it screws with my muscle memory.Ex. if I start an annotation like so:
---@class SomeClass
and I press enter, I get
---@
added immediately:Pressing enter again just makes another line with
---@
, so it's incredibly frustrating to start a normal code line now as I have to manually delete the---@
every time.Does anyone know how to turn this off?
New lines within tables are also acting very strange, just screwing up the indentation. This is me pressing enter twice inbetween two table fields:
2024-08-06.11-33-10.mp4
Beta Was this translation helpful? Give feedback.
All reactions