-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.py
40 lines (29 loc) · 1.07 KB
/
types.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from __future__ import annotations
from typing_extensions import NotRequired, TypedDict, List, Tuple
from LSP.plugin.core.protocol import URI, Location, Range, TextDocumentIdentifier
# Code Lens Show Reference - Start
class ShowReference(TypedDict):
references: List[Location]
uri: URI
range: Range
ShowReferencesParams = List[ShowReference]
# Code Lens Show Reference - End
# Move Function Code Action - Start
class MoveDestination(TypedDict):
name: str
path: str
uri: str
class MoveParamsParams(TypedDict):
textDocument: TextDocumentIdentifier
range: Range
class MoveParams(TypedDict):
sourceUri: URI
params: MoveParamsParams
destination: NotRequired[MoveDestination]
class MoveDestinationsResponse(TypedDict):
destinations: List[MoveDestination]
class MoveFunctionCommand(TypedDict):
arguments: Tuple[str, MoveParamsParams, str]
command: str # string like elm.refactor-${workspaceId}, for example: 'elm.refactor-file:///home/predragnikolic/Documents/sandbox/elm-spa-example'
title: str
# Move Function Code Action - End