Returns the location of the definition for the symbol at the given position.
The input position should point inside the symbol’s identifier, e.g.
The returned position points to the identifier of the symbol, and the file_path from workspace root
e.g. for the definition of User
on line 5 of src/main.py
with the code:
0: class User:
output___^
1: def __init__(self, name, age):
2: self.name = name
3: self.age = age
4:
5: user = User("John", 30)
input_____^^^^
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Definition retrieved successfully
Response to a definition request.
The definition(s) of the symbol. Points to the start position of the symbol's identifier.
e.g. for the definition of User
on line 5 of src/main.py
with the code:
0: class User:
_________^
1: def __init__(self, name, age):
2: self.name = name
3: self.age = age
4:
5: user = User("John", 30)
__________^
The definition(s) will be [{"path": "src/main.py", "line": 0, "character": 6}]
.