-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autocompletion: enable string literal completion in subscripts
(cherry picked from commit c824403)
- Loading branch information
1 parent
8fa7c86
commit f697591
Showing
19 changed files
with
181 additions
and
0 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
9 changes: 9 additions & 0 deletions
9
modules/gdscript/tests/scripts/completion/index/array_type.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,9 @@ | ||
[output] | ||
include=[ | ||
{"display": "outer"}, | ||
{"display": "inner"}, | ||
] | ||
exclude=[ | ||
{"display": "append"}, | ||
{"display": "\"append\""}, | ||
] |
10 changes: 10 additions & 0 deletions
10
modules/gdscript/tests/scripts/completion/index/array_type.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,10 @@ | ||
extends Node | ||
|
||
var outer | ||
|
||
func _ready() -> void: | ||
var inner | ||
|
||
var array: Array | ||
|
||
array[i➡] |
9 changes: 9 additions & 0 deletions
9
modules/gdscript/tests/scripts/completion/index/array_value.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,9 @@ | ||
[output] | ||
include=[ | ||
{"display": "outer"}, | ||
{"display": "inner"}, | ||
] | ||
exclude=[ | ||
{"display": "append"}, | ||
{"display": "\"append\""}, | ||
] |
10 changes: 10 additions & 0 deletions
10
modules/gdscript/tests/scripts/completion/index/array_value.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,10 @@ | ||
extends Node | ||
|
||
var outer | ||
|
||
func _ready() -> void: | ||
var inner | ||
|
||
var array = [] | ||
|
||
array[i➡] |
11 changes: 11 additions & 0 deletions
11
modules/gdscript/tests/scripts/completion/index/const_dictionary_keys.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,11 @@ | ||
[output] | ||
include=[ | ||
{"display": "\"key1\""}, | ||
{"display": "\"key2\""}, | ||
] | ||
exclude=[ | ||
{"display": "keys"}, | ||
{"display": "\"keys\""}, | ||
{"display": "key1"}, | ||
{"display": "key2"}, | ||
] |
13 changes: 13 additions & 0 deletions
13
modules/gdscript/tests/scripts/completion/index/const_dictionary_keys.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,13 @@ | ||
extends Node | ||
|
||
var outer | ||
|
||
const dict = { | ||
"key1": "value", | ||
"key2": null, | ||
} | ||
|
||
func _ready() -> void: | ||
var inner | ||
|
||
dict["➡"] |
9 changes: 9 additions & 0 deletions
9
modules/gdscript/tests/scripts/completion/index/dictionary_type.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,9 @@ | ||
[output] | ||
include=[ | ||
{"display": "outer"}, | ||
{"display": "inner"}, | ||
] | ||
exclude=[ | ||
{"display": "keys"}, | ||
{"display": "\"keys\""}, | ||
] |
10 changes: 10 additions & 0 deletions
10
modules/gdscript/tests/scripts/completion/index/dictionary_type.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,10 @@ | ||
extends Node | ||
|
||
var outer | ||
|
||
func _ready() -> void: | ||
var inner | ||
|
||
var dict: Dictionary | ||
|
||
dict[i➡] |
9 changes: 9 additions & 0 deletions
9
modules/gdscript/tests/scripts/completion/index/dictionary_value.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,9 @@ | ||
[output] | ||
include=[ | ||
{"display": "outer"}, | ||
{"display": "inner"}, | ||
] | ||
exclude=[ | ||
{"display": "keys"}, | ||
{"display": "\"keys\""}, | ||
] |
10 changes: 10 additions & 0 deletions
10
modules/gdscript/tests/scripts/completion/index/dictionary_value.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,10 @@ | ||
extends Node | ||
|
||
var outer | ||
|
||
func _ready() -> void: | ||
var inner | ||
|
||
var dict = {} | ||
|
||
dict[i➡] |
11 changes: 11 additions & 0 deletions
11
modules/gdscript/tests/scripts/completion/index/local_dictionary_keys.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,11 @@ | ||
[output] | ||
include=[ | ||
{"display": "\"key1\""}, | ||
{"display": "\"key2\""}, | ||
] | ||
exclude=[ | ||
{"display": "keys"}, | ||
{"display": "\"keys\""}, | ||
{"display": "key1"}, | ||
{"display": "key2"}, | ||
] |
13 changes: 13 additions & 0 deletions
13
modules/gdscript/tests/scripts/completion/index/local_dictionary_keys.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,13 @@ | ||
extends Node | ||
|
||
var outer | ||
|
||
func _ready() -> void: | ||
var inner | ||
|
||
var dict: Dictionary = { | ||
"key1": "value", | ||
"key2": null, | ||
} | ||
|
||
dict["➡"] |
9 changes: 9 additions & 0 deletions
9
modules/gdscript/tests/scripts/completion/index/property_dictionary_keys.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,9 @@ | ||
[output] | ||
exclude=[ | ||
{"display": "keys"}, | ||
{"display": "\"keys\""}, | ||
{"display": "key1"}, | ||
{"display": "key2"}, | ||
{"display": "\"key1\""}, | ||
{"display": "\"key2\""}, | ||
] |
13 changes: 13 additions & 0 deletions
13
modules/gdscript/tests/scripts/completion/index/property_dictionary_keys.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,13 @@ | ||
extends Node | ||
|
||
var outer | ||
|
||
var dict = { | ||
"key1": "value", | ||
"key2": null, | ||
} | ||
|
||
func _ready() -> void: | ||
var inner | ||
|
||
dict["➡"] |
5 changes: 5 additions & 0 deletions
5
modules/gdscript/tests/scripts/completion/index/untyped_local.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=[ | ||
{"display": "outer"}, | ||
{"display": "inner"}, | ||
] |
10 changes: 10 additions & 0 deletions
10
modules/gdscript/tests/scripts/completion/index/untyped_local.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,10 @@ | ||
extends Node | ||
|
||
var outer | ||
|
||
func _ready() -> void: | ||
var inner | ||
|
||
var array | ||
|
||
array[i➡] |
5 changes: 5 additions & 0 deletions
5
modules/gdscript/tests/scripts/completion/index/untyped_property.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=[ | ||
{"display": "outer"}, | ||
{"display": "inner"}, | ||
] |
9 changes: 9 additions & 0 deletions
9
modules/gdscript/tests/scripts/completion/index/untyped_property.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,9 @@ | ||
extends Node | ||
|
||
var outer | ||
var array | ||
|
||
func _ready() -> void: | ||
var inner | ||
|
||
array[i➡] |