Skip to content

Commit d554f7c

Browse files
authored
LSP: Fix LSP::LocationLink's not being returned within an array (#629)
1 parent 0668cac commit d554f7c

File tree

66 files changed

+1730
-1608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1730
-1608
lines changed

spec/language_server/definition/location_link/connect

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,39 +42,41 @@ component Test {
4242
-------------------------------------------------------------------------request
4343
{
4444
"jsonrpc": "2.0",
45-
"result": {
46-
"originSelectionRange": {
47-
"start": {
48-
"line": 1,
49-
"character": 10
50-
},
51-
"end": {
52-
"line": 1,
53-
"character": 15
54-
}
55-
},
56-
"targetUri": "file://#{root_path}/store.mint",
57-
"targetRange": {
58-
"start": {
59-
"line": 0,
60-
"character": 0
45+
"result": [
46+
{
47+
"originSelectionRange": {
48+
"start": {
49+
"line": 1,
50+
"character": 10
51+
},
52+
"end": {
53+
"line": 1,
54+
"character": 15
55+
}
6156
},
62-
"end": {
63-
"line": 3,
64-
"character": 1
65-
}
66-
},
67-
"targetSelectionRange": {
68-
"start": {
69-
"line": 1,
70-
"character": 6
57+
"targetUri": "file://#{root_path}/store.mint",
58+
"targetRange": {
59+
"start": {
60+
"line": 0,
61+
"character": 0
62+
},
63+
"end": {
64+
"line": 3,
65+
"character": 1
66+
}
7167
},
72-
"end": {
73-
"line": 1,
74-
"character": 11
68+
"targetSelectionRange": {
69+
"start": {
70+
"line": 1,
71+
"character": 6
72+
},
73+
"end": {
74+
"line": 1,
75+
"character": 11
76+
}
7577
}
7678
}
77-
},
79+
],
7880
"id": 1
7981
}
8082
------------------------------------------------------------------------response

spec/language_server/definition/location_link/connect_variable_constant

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,39 +42,41 @@ component Test {
4242
-------------------------------------------------------------------------request
4343
{
4444
"jsonrpc": "2.0",
45-
"result": {
46-
"originSelectionRange": {
47-
"start": {
48-
"line": 1,
49-
"character": 27
50-
},
51-
"end": {
52-
"line": 1,
53-
"character": 35
54-
}
55-
},
56-
"targetUri": "file://#{root_path}/store.mint",
57-
"targetRange": {
58-
"start": {
59-
"line": 2,
60-
"character": 2
45+
"result": [
46+
{
47+
"originSelectionRange": {
48+
"start": {
49+
"line": 1,
50+
"character": 27
51+
},
52+
"end": {
53+
"line": 1,
54+
"character": 35
55+
}
6156
},
62-
"end": {
63-
"line": 2,
64-
"character": 23
65-
}
66-
},
67-
"targetSelectionRange": {
68-
"start": {
69-
"line": 2,
70-
"character": 8
57+
"targetUri": "file://#{root_path}/store.mint",
58+
"targetRange": {
59+
"start": {
60+
"line": 2,
61+
"character": 2
62+
},
63+
"end": {
64+
"line": 2,
65+
"character": 23
66+
}
7167
},
72-
"end": {
73-
"line": 2,
74-
"character": 16
68+
"targetSelectionRange": {
69+
"start": {
70+
"line": 2,
71+
"character": 8
72+
},
73+
"end": {
74+
"line": 2,
75+
"character": 16
76+
}
7577
}
7678
}
77-
},
79+
],
7880
"id": 1
7981
}
8082
------------------------------------------------------------------------response

spec/language_server/definition/location_link/connect_variable_function

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -44,39 +44,41 @@ component Test {
4444
-------------------------------------------------------------------------request
4545
{
4646
"jsonrpc": "2.0",
47-
"result": {
48-
"originSelectionRange": {
49-
"start": {
50-
"line": 1,
51-
"character": 27
52-
},
53-
"end": {
54-
"line": 1,
55-
"character": 31
56-
}
57-
},
58-
"targetUri": "file://#{root_path}/store.mint",
59-
"targetRange": {
60-
"start": {
61-
"line": 2,
62-
"character": 2
47+
"result": [
48+
{
49+
"originSelectionRange": {
50+
"start": {
51+
"line": 1,
52+
"character": 27
53+
},
54+
"end": {
55+
"line": 1,
56+
"character": 31
57+
}
6358
},
64-
"end": {
65-
"line": 4,
66-
"character": 3
67-
}
68-
},
69-
"targetSelectionRange": {
70-
"start": {
71-
"line": 2,
72-
"character": 6
59+
"targetUri": "file://#{root_path}/store.mint",
60+
"targetRange": {
61+
"start": {
62+
"line": 2,
63+
"character": 2
64+
},
65+
"end": {
66+
"line": 4,
67+
"character": 3
68+
}
7369
},
74-
"end": {
75-
"line": 2,
76-
"character": 10
70+
"targetSelectionRange": {
71+
"start": {
72+
"line": 2,
73+
"character": 6
74+
},
75+
"end": {
76+
"line": 2,
77+
"character": 10
78+
}
7779
}
7880
}
79-
},
81+
],
8082
"id": 1
8183
}
8284
------------------------------------------------------------------------response

spec/language_server/definition/location_link/connect_variable_get

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -44,39 +44,41 @@ component Test {
4444
-------------------------------------------------------------------------request
4545
{
4646
"jsonrpc": "2.0",
47-
"result": {
48-
"originSelectionRange": {
49-
"start": {
50-
"line": 1,
51-
"character": 27
52-
},
53-
"end": {
54-
"line": 1,
55-
"character": 31
56-
}
57-
},
58-
"targetUri": "file://#{root_path}/store.mint",
59-
"targetRange": {
60-
"start": {
61-
"line": 2,
62-
"character": 2
47+
"result": [
48+
{
49+
"originSelectionRange": {
50+
"start": {
51+
"line": 1,
52+
"character": 27
53+
},
54+
"end": {
55+
"line": 1,
56+
"character": 31
57+
}
6358
},
64-
"end": {
65-
"line": 5,
66-
"character": 0
67-
}
68-
},
69-
"targetSelectionRange": {
70-
"start": {
71-
"line": 2,
72-
"character": 6
59+
"targetUri": "file://#{root_path}/store.mint",
60+
"targetRange": {
61+
"start": {
62+
"line": 2,
63+
"character": 2
64+
},
65+
"end": {
66+
"line": 5,
67+
"character": 0
68+
}
7369
},
74-
"end": {
75-
"line": 2,
76-
"character": 10
70+
"targetSelectionRange": {
71+
"start": {
72+
"line": 2,
73+
"character": 6
74+
},
75+
"end": {
76+
"line": 2,
77+
"character": 10
78+
}
7779
}
7880
}
79-
},
81+
],
8082
"id": 1
8183
}
8284
------------------------------------------------------------------------response

spec/language_server/definition/location_link/connect_variable_state

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,39 +42,41 @@ component Test {
4242
-------------------------------------------------------------------------request
4343
{
4444
"jsonrpc": "2.0",
45-
"result": {
46-
"originSelectionRange": {
47-
"start": {
48-
"line": 1,
49-
"character": 27
50-
},
51-
"end": {
52-
"line": 1,
53-
"character": 35
54-
}
55-
},
56-
"targetUri": "file://#{root_path}/store.mint",
57-
"targetRange": {
58-
"start": {
59-
"line": 2,
60-
"character": 2
45+
"result": [
46+
{
47+
"originSelectionRange": {
48+
"start": {
49+
"line": 1,
50+
"character": 27
51+
},
52+
"end": {
53+
"line": 1,
54+
"character": 35
55+
}
6156
},
62-
"end": {
63-
"line": 2,
64-
"character": 24
65-
}
66-
},
67-
"targetSelectionRange": {
68-
"start": {
69-
"line": 2,
70-
"character": 8
57+
"targetUri": "file://#{root_path}/store.mint",
58+
"targetRange": {
59+
"start": {
60+
"line": 2,
61+
"character": 2
62+
},
63+
"end": {
64+
"line": 2,
65+
"character": 24
66+
}
7167
},
72-
"end": {
73-
"line": 2,
74-
"character": 16
68+
"targetSelectionRange": {
69+
"start": {
70+
"line": 2,
71+
"character": 8
72+
},
73+
"end": {
74+
"line": 2,
75+
"character": 16
76+
}
7577
}
7678
}
77-
},
79+
],
7880
"id": 1
7981
}
8082
------------------------------------------------------------------------response

0 commit comments

Comments
 (0)