-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94082 from HolonProduction/completion-force
Autocompletion: Rework argument options string literal completion
- Loading branch information
Showing
30 changed files
with
201 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ts/completion/argument_options/string_literals/argument_options_inside_string_literal.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[output] | ||
include=[ | ||
{"insert_text": "\"property_of_a\""}, | ||
{"insert_text": "\"name\""}, | ||
] |
8 changes: 8 additions & 0 deletions
8
...pts/completion/argument_options/string_literals/argument_options_inside_string_literal.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends Node | ||
|
||
const A = preload ("res://completion/class_a.notest.gd") | ||
|
||
func _ready() -> void: | ||
var a := A.new() | ||
var tween := get_tree().create_tween() | ||
tween.tween_property(a, "➡") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
modules/gdscript/tests/scripts/completion/common/identifiers_in_call.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
extends "res://completion/class_a.notest.gd" | ||
|
||
signal test_signal_1(a) | ||
signal test_signal_2(a: int) | ||
|
||
var test_var_1 | ||
var test_var_2: int | ||
|
||
func test_func_1(t): | ||
pass | ||
|
||
func test_func_2(t: int) -> void: | ||
pass | ||
|
||
func _init(test_parameter_1, test_parameter_2: String): | ||
var local_test_var_1 | ||
var local_test_var_2: int | ||
print(t➡) |
25 changes: 25 additions & 0 deletions
25
modules/gdscript/tests/scripts/completion/common/identifiers_in_function_body.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
scene="res://completion/get_node/get_node.tscn" | ||
[output] | ||
include=[ | ||
; Node | ||
{"display": "add_child"}, | ||
{"display": "owner"}, | ||
{"display": "child_entered_tree"}, | ||
|
||
; GDScript: class_a.notest.gd | ||
{"display": "property_of_a"}, | ||
{"display": "func_of_a"}, | ||
{"display": "signal_of_a"}, | ||
|
||
; GDScript: identifiers.gd | ||
{"display": "test_signal_1"}, | ||
{"display": "test_signal_2"}, | ||
{"display": "test_var_1"}, | ||
{"display": "test_var_2"}, | ||
{"display": "test_func_1"}, | ||
{"display": "test_func_2"}, | ||
{"display": "test_parameter_1"}, | ||
{"display": "test_parameter_2"}, | ||
{"display": "local_test_var_1"}, | ||
{"display": "local_test_var_2"}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
modules/gdscript/tests/scripts/completion/common/identifiers_in_unclosed_call.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
scene="res://completion/get_node/get_node.tscn" | ||
[output] | ||
include=[ | ||
; Node | ||
{"display": "add_child"}, | ||
{"display": "owner"}, | ||
{"display": "child_entered_tree"}, | ||
|
||
; GDScript: class_a.notest.gd | ||
{"display": "property_of_a"}, | ||
{"display": "func_of_a"}, | ||
{"display": "signal_of_a"}, | ||
|
||
; GDScript: identifiers.gd | ||
{"display": "test_signal_1"}, | ||
{"display": "test_signal_2"}, | ||
{"display": "test_var_1"}, | ||
{"display": "test_var_2"}, | ||
{"display": "test_func_1"}, | ||
{"display": "test_func_2"}, | ||
{"display": "test_parameter_1"}, | ||
{"display": "test_parameter_2"}, | ||
{"display": "local_test_var_1"}, | ||
{"display": "local_test_var_2"}, | ||
] |
22 changes: 22 additions & 0 deletions
22
modules/gdscript/tests/scripts/completion/common/identifiers_in_unclosed_call.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# godotengine/godot#92226 | ||
extends "res://completion/class_a.notest.gd" | ||
|
||
signal test_signal_1(a) | ||
signal test_signal_2(a: int) | ||
|
||
var test_var_1 | ||
var test_var_2: int | ||
|
||
func test_func_1(t): | ||
pass | ||
|
||
func test_func_2(t: int) -> void: | ||
pass | ||
|
||
func _init(test_parameter_1, test_parameter_2: String): | ||
var local_test_var_1 | ||
var local_test_var_2: int | ||
print(t➡ | ||
|
||
if true: | ||
pass |
26 changes: 26 additions & 0 deletions
26
modules/gdscript/tests/scripts/completion/common/no_completion_in_string.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
scene="res://completion/get_node/get_node.tscn" | ||
[output] | ||
exclude=[ | ||
; Node | ||
{"display": "add_child"}, | ||
{"display": "owner"}, | ||
{"display": "child_entered_tree"}, | ||
{"display": "add_child"}, | ||
|
||
; GDScript: class_a.notest.gd | ||
{"display": "property_of_a"}, | ||
{"display": "func_of_a"}, | ||
{"display": "signal_of_a"}, | ||
|
||
; GDScript: no_completion_in_string.gd | ||
{"display": "test_signal_1"}, | ||
{"display": "test_signal_2"}, | ||
{"display": "test_var_1"}, | ||
{"display": "test_var_2"}, | ||
{"display": "test_func_1"}, | ||
{"display": "test_func_2"}, | ||
{"display": "test_parameter_1"}, | ||
{"display": "test_parameter_2"}, | ||
{"display": "local_test_var_1"}, | ||
{"display": "local_test_var_2"}, | ||
] |
19 changes: 19 additions & 0 deletions
19
modules/gdscript/tests/scripts/completion/common/no_completion_in_string.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# godotengine/godot#62945 | ||
extends "res://completion/class_a.notest.gd" | ||
|
||
signal test_signal_1(a) | ||
signal test_signal_2(a: int) | ||
|
||
var test_var_1 | ||
var test_var_2: int | ||
|
||
func test_func_1(t): | ||
pass | ||
|
||
func test_func_2(t: int) -> void: | ||
pass | ||
|
||
func _init(test_parameter_1, test_parameter_2: String): | ||
var local_test_var_1 | ||
var local_test_var_2: int | ||
var a = "➡" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ func test_func_2(t: int) -> void: | |
|
||
func _init(): | ||
self.➡ | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ extends CPUParticles2D | |
@export_subgroup("Test Subgroup") | ||
|
||
func _init(): | ||
➡ | ||
t➡ | ||
pass |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.