godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.53k stars 151 forks source link

Start of path link misaligned when line is indented with tabs #464

Closed WeaverSong closed 1 year ago

WeaverSong commented 1 year ago

Godot version

4.0.2

VS Code version

1.77.3

Godot Tools VS Code extension version

1.3.1

System information

Debian/Gnome

Issue description

When a line that includes a path to another file is indented with tabs, the start of the link also indents, becoming farther and farther from the actual start of the path. image

Steps to reproduce

Add a line that includes a path to another file, then indent it with tabs.

DaelonSuzuka commented 1 year ago

That's a fun one. Just out of curiosity, are you indenting with tabs or spaces?

WeaverSong commented 1 year ago

I use tabs normally, so that's what I've been using with Godot. I didn't test super thoroughly, but it looked like it didn't happen if I swapped the tabs to spaces; although then Godot was complaining about my mixing tabs and spaces, which might have affected the results.

DaelonSuzuka commented 1 year ago

Can you share the text of the file in your screenshot? I can't seem to replicate this locally.

WeaverSong commented 1 year ago

Of course. The file is rather large, but this snippet is enough to cause it for me. There needs to be a file at the place specified, of course. var test = [ load("res://scenes/biomes/borkfest/enemies/Ancient Hot Fork.tscn") ]

WeaverSong commented 1 year ago

Of course, then github removed the newlines. The load has to be indented, so it only happens if the array is separated out unto multiple lines.