1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Language Server: Improve hovered symbol resolution, fix renaming bugs, implement reference lookup

Co-Authored-By: Ryan Brue <56272643+ryanabx@users.noreply.github.com>
Co-Authored-By: BooksBaum <15612932+booksbaum@users.noreply.github.com>
This commit is contained in:
BooksBaum
2023-07-28 17:06:08 +02:00
committed by ryanabx
parent 221884e6bc
commit 0202a36a7a
18 changed files with 1661 additions and 360 deletions

View File

@@ -0,0 +1,56 @@
extends Node
var value := 42
# ^^^^^ member:value -> member:value
func variable():
var value = value + 42
#! | | ^^^^^ -> member:value
# ^^^^^ variable:value -> variable:value
print(value)
# ^^^^^ -> variable:value
func array():
var value = [1,value,3,value+4]
#! | | | | ^^^^^ -> member:value
#! | | ^^^^^ -> member:value
# ^^^^^ array:value -> array:value
print(value)
# ^^^^^ -> array:value
func dictionary():
var value = {
# ^^^^^ dictionary:value -> dictionary:value
"key1": value,
#! ^^^^^ -> member:value
"key2": 1 + value + 3,
#! ^^^^^ -> member:value
}
print(value)
# ^^^^^ -> dictionary:value
func for_loop():
for value in value:
# | | ^^^^^ -> member:value
# ^^^^^ for:value -> for:value
print(value)
# ^^^^^ -> for:value
func for_range():
for value in range(5, value):
# | | ^^^^^ -> member:value
# ^^^^^ for:range:value -> for:range:value
print(value)
# ^^^^^ -> for:range:value
func matching():
match value:
# ^^^^^ -> member:value
42: print(value)
# ^^^^^ -> member:value
[var value, ..]: print(value)
# | | ^^^^^ -> match:array:value
# ^^^^^ match:array:value -> match:array:value
var value: print(value)
# | | ^^^^^ -> match:var:value
# ^^^^^ match:var:value -> match:var:value