godotengine / godotengine/godot-vscode-plugin
Wrong code formatting with `@abstract` and `is`
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
### Godot version
v4.7.dev1.official [bf95b6258]
### VS Code version
1.109.5
### Godot Tools VS Code extension version
2.6.1
### System information
Windows 11
### Issue description
When formatting code with `@abstract` in a function before and using `is` with `()` braces around, it will remove the spaces.
### Steps to reproduce
When formatting the following code
```
@abstract
extends RefCounted
@abstract func foo()
func cmp(other: Node):
if (other is Node):
pass
```
The first formatting will be:
```
@abstract
extends RefCounted
@abstract func foo()
func cmp(other: Node):
if (other isNode):
pass
```
and after another
```
@abstract
extends RefCounted
@abstract func foo()
func cmp(other: Node):
if (otherisNode):
pass
```
Contributor guide
Assessment
This issue has not been assessed yet.