vscode-teal
vscode-teal copied to clipboard
Typing "end" in a function definition removes indentation
Example:
GetSet_LoopTimeRange: function(
isSet: boolean,
isLoop: boolean,
start: number,
end_: number,
allowautoseek: boolean
): number, number
Here, the end_
parameter has to be reindented manually.
- Version of Visual Studio Code: 1.61.0
- Version of the extension: 0.8.3
I see that the built-in Lua support in vscode has the same issue:
local x = {
end_ = "don't indent me!"
}
For the time being, I don't know how we should fix this.
One solution could be to disable automatic indentation inside certain constructs. I think we would have to bypass vscode's indentation rules feature, and run custom indentation code whenever the user presses the Enter key. Maybe this project could be used as a reference: https://github.com/kaiwood/vscode-endwise