Merge pull request #106198 from SatLess/User-Func-Autocomplete

Add code completion for user-defined methods when overriding in GDScript
This commit is contained in:
Rémi Verschelde
2025-06-09 00:44:22 +02:00
11 changed files with 124 additions and 9 deletions

View File

@@ -6,3 +6,18 @@ var property_of_a
func func_of_a():
pass
func _func_of_a_underscore():
pass
static func func_of_a_static():
pass
func func_of_a_args(a: int):
pass
func func_of_a_callable(call := func():
var x_of_a = 10):
pass

View File

@@ -0,0 +1,13 @@
scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; GDScript: class_a.notest.gd
{"display": "func_of_a():"},
{"display": "func_of_a_args(a: int):"},
{"display": "func_of_a_callable(call := func():
var x_of_a = 10):"}
]
exclude=[
; GDScript: class_a.notest.gd
{"display": "_static_init() -> void:"},
]

View File

@@ -0,0 +1,3 @@
extends "res://completion/class_a.notest.gd"
func

View File

@@ -0,0 +1,14 @@
scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; GDScript: class_a.notest.gd
{"display": "_static_init() -> void:"},
{"display": "func_of_a_static():"},
]
exclude=[
; GDScript: class_a.notest.gd
{"display": "func_of_a():"},
{"display": "func_of_a_args(a: int):"},
{"display": "func_of_a_callable(call := func():
var x_of_a = 10):"},
]

View File

@@ -0,0 +1,3 @@
extends "res://completion/class_a.notest.gd"
static func

View File

@@ -0,0 +1,10 @@
scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; GDScript: class_a.notest.gd
{"display": "_func_of_a_underscore():"},
]
exclude=[
; GDScript: class_a.notest.gd
{"display": "_static_init() -> void:"},
]

View File

@@ -0,0 +1,3 @@
extends "res://completion/class_a.notest.gd"
func _