godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.52k stars 149 forks source link

Disable code suggestions when typing comments or strings #480

Closed Tuckertcs closed 10 months ago

Tuckertcs commented 1 year ago

Godot version

v4.0.stable.mono.official [92bee43ad]

VS Code version

1.78.2

Godot Tools VS Code extension version

1.3.1

System information

Linux Mint (Cinnamon)

Problem statement

When typing a comment or a string in a GDScript file using VS Code, there are code suggestions.

Since these are two areas that code suggestions aren't needed (or wanted),this causes problems and is an annoyance when you're trying to hit enter or the up/down arrows after typing a comment line, as you end up messing with the code suggestions instead of actually making a new line or moving the cursor.

Proposed solution

Disable code suggestions when typing comments and strings.

Chtau commented 10 months ago

I think this is a problem with the LSP and should be in the Godot Repo

DaelonSuzuka commented 10 months ago

Since these are two areas that code suggestions aren't needed (or wanted)

This is incorrect. There are many situations in Godot where string suggestions are highly desirable:

get_node("Child")
$"../Sibling"
node.connect("signal_name", obj, "method_name")

In each of these cases, the LSP knows or can make reasonable guesses about the possible values of these string literals.