alefragnani / vscode-separators

Separators Extension for Visual Studio Code
GNU General Public License v3.0
40 stars 6 forks source link

[BUG] - No separators in a *.gdscript file starting with a comment! #104

Open BrianOSH opened 1 day ago

BrianOSH commented 1 day ago
No  separators in a *.gdscript file starting with a comment! unless a class_name is added to the file.

##----------------------------
## No separators
##----------------------------
extends Button

##----------------------------
## Separators
##----------------------------
class_name Name extends Button

- Extension version: 2,7,0
- VSCode version: v1.95.3
- OS version: Linux Mint 5.15.0-126-generic
alefragnani commented 1 day ago

Hi @BrianOSH ,

The separators depends on the language extension (that you are using) to provide each symbol that could have a separator. I would ask you to open the Outline View, in order to identify what it displays on both scenarios, and share the print screen in a comment.

BTW, I suppose *.gdscript files are related to Godot, right?

BrianOSH commented 1 day ago

gdscript is used by Godot. How do I open the Outline View?

alefragnani commented 1 day ago

You either use the Explorer: Focus on Outline View command, via Command Palette, or look for it in the bottom of the (native) Explorer Panel, near the Timeline view.

BrianOSH commented 1 day ago

Without a class_name no symbols found in document 'file.gd' is printed in the outline view. With a class_name all functions are printed in the outline view.

This bug only happens if the file starts with a comment if the file doesn't start with a comment all functions appear in the outline view regardless of a class_name or not.

gdscript functions start with the keyword 'func'

I hope this helps

BrianOSH commented 1 day ago

It looks like the language extension has the bug. if i disable your extension and start the file with a comment no functions appear in the outline view.

alefragnani commented 1 day ago

That's what I would say about that. The language extension doesn't seems to recognize that file structure (without class_name).

I would suggest you to report that on the language extension issues, so the team could take a look, and fix the issue or point you in another direction, if that's the case.

Hope this helps

BrianOSH commented 1 day ago

The language extension doesn't seems to recognize that file structure (without class_name). Only if the file starts with a comment...

I will pass this info onto them as you suggest Thanks for the quick response and your help.

alefragnani commented 1 day ago

BTW, which language extension are you using?

BrianOSH commented 1 day ago

godot-tools v2.3.0

alefragnani commented 1 day ago

Issue opened in language extension repo: https://github.com/godotengine/godot-vscode-plugin/issues/759 Considered duplicate of https://github.com/godotengine/godot-vscode-plugin/issues/658 Considered issue in the LSP https://github.com/godotengine/godot/issues/98164 MR that fixes the issue https://github.com/godotengine/godot/issues/98164

I suppose once the MR is merged, and a new release is published, the separators should work just fine.