Skip to content

Commit 8671a04

Browse files
author
Andy Waite
authored
Add glyph for 'Run' code lenses (#2973)
Add glyph for Run code lenses
1 parent 896617a commit 8671a04

File tree

7 files changed

+124
-134
lines changed

7 files changed

+124
-134
lines changed

lib/ruby_lsp/listeners/code_lens.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ def add_test_code_lens(node, name:, command:, kind:, id: name)
198198

199199
@response_builder << create_code_lens(
200200
node,
201-
title: "Run",
201+
title: "Run",
202202
command_name: "rubyLsp.runTest",
203203
arguments: arguments,
204204
data: { type: "test", **grouping_data },
205205
)
206206

207207
@response_builder << create_code_lens(
208208
node,
209-
title: "Run In Terminal",
209+
title: "Run In Terminal",
210210
command_name: "rubyLsp.runTestInTerminal",
211211
arguments: arguments,
212212
data: { type: "test_in_terminal", **grouping_data },

test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
},
1414
"command": {
15-
"title": "Run",
15+
"title": "Run",
1616
"command": "rubyLsp.runTest",
1717
"arguments": [
1818
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -46,7 +46,7 @@
4646
}
4747
},
4848
"command": {
49-
"title": "Run In Terminal",
49+
"title": "Run In Terminal",
5050
"command": "rubyLsp.runTestInTerminal",
5151
"arguments": [
5252
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -114,7 +114,7 @@
114114
}
115115
},
116116
"command": {
117-
"title": "Run",
117+
"title": "Run",
118118
"command": "rubyLsp.runTest",
119119
"arguments": [
120120
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -147,7 +147,7 @@
147147
}
148148
},
149149
"command": {
150-
"title": "Run In Terminal",
150+
"title": "Run In Terminal",
151151
"command": "rubyLsp.runTestInTerminal",
152152
"arguments": [
153153
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -213,7 +213,7 @@
213213
}
214214
},
215215
"command": {
216-
"title": "Run",
216+
"title": "Run",
217217
"command": "rubyLsp.runTest",
218218
"arguments": [
219219
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -246,7 +246,7 @@
246246
}
247247
},
248248
"command": {
249-
"title": "Run In Terminal",
249+
"title": "Run In Terminal",
250250
"command": "rubyLsp.runTestInTerminal",
251251
"arguments": [
252252
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -312,7 +312,7 @@
312312
}
313313
},
314314
"command": {
315-
"title": "Run",
315+
"title": "Run",
316316
"command": "rubyLsp.runTest",
317317
"arguments": [
318318
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -346,7 +346,7 @@
346346
}
347347
},
348348
"command": {
349-
"title": "Run In Terminal",
349+
"title": "Run In Terminal",
350350
"command": "rubyLsp.runTestInTerminal",
351351
"arguments": [
352352
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -414,7 +414,7 @@
414414
}
415415
},
416416
"command": {
417-
"title": "Run",
417+
"title": "Run",
418418
"command": "rubyLsp.runTest",
419419
"arguments": [
420420
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -447,7 +447,7 @@
447447
}
448448
},
449449
"command": {
450-
"title": "Run In Terminal",
450+
"title": "Run In Terminal",
451451
"command": "rubyLsp.runTestInTerminal",
452452
"arguments": [
453453
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -513,7 +513,7 @@
513513
}
514514
},
515515
"command": {
516-
"title": "Run",
516+
"title": "Run",
517517
"command": "rubyLsp.runTest",
518518
"arguments": [
519519
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -547,7 +547,7 @@
547547
}
548548
},
549549
"command": {
550-
"title": "Run In Terminal",
550+
"title": "Run In Terminal",
551551
"command": "rubyLsp.runTestInTerminal",
552552
"arguments": [
553553
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -615,7 +615,7 @@
615615
}
616616
},
617617
"command": {
618-
"title": "Run",
618+
"title": "Run",
619619
"command": "rubyLsp.runTest",
620620
"arguments": [
621621
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -648,7 +648,7 @@
648648
}
649649
},
650650
"command": {
651-
"title": "Run In Terminal",
651+
"title": "Run In Terminal",
652652
"command": "rubyLsp.runTestInTerminal",
653653
"arguments": [
654654
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -714,7 +714,7 @@
714714
}
715715
},
716716
"command": {
717-
"title": "Run",
717+
"title": "Run",
718718
"command": "rubyLsp.runTest",
719719
"arguments": [
720720
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -747,7 +747,7 @@
747747
}
748748
},
749749
"command": {
750-
"title": "Run In Terminal",
750+
"title": "Run In Terminal",
751751
"command": "rubyLsp.runTestInTerminal",
752752
"arguments": [
753753
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -813,7 +813,7 @@
813813
}
814814
},
815815
"command": {
816-
"title": "Run",
816+
"title": "Run",
817817
"command": "rubyLsp.runTest",
818818
"arguments": [
819819
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -847,7 +847,7 @@
847847
}
848848
},
849849
"command": {
850-
"title": "Run In Terminal",
850+
"title": "Run In Terminal",
851851
"command": "rubyLsp.runTestInTerminal",
852852
"arguments": [
853853
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -915,7 +915,7 @@
915915
}
916916
},
917917
"command": {
918-
"title": "Run",
918+
"title": "Run",
919919
"command": "rubyLsp.runTest",
920920
"arguments": [
921921
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -948,7 +948,7 @@
948948
}
949949
},
950950
"command": {
951-
"title": "Run In Terminal",
951+
"title": "Run In Terminal",
952952
"command": "rubyLsp.runTestInTerminal",
953953
"arguments": [
954954
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1014,7 +1014,7 @@
10141014
}
10151015
},
10161016
"command": {
1017-
"title": "Run",
1017+
"title": "Run",
10181018
"command": "rubyLsp.runTest",
10191019
"arguments": [
10201020
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1048,7 +1048,7 @@
10481048
}
10491049
},
10501050
"command": {
1051-
"title": "Run In Terminal",
1051+
"title": "Run In Terminal",
10521052
"command": "rubyLsp.runTestInTerminal",
10531053
"arguments": [
10541054
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1116,7 +1116,7 @@
11161116
}
11171117
},
11181118
"command": {
1119-
"title": "Run",
1119+
"title": "Run",
11201120
"command": "rubyLsp.runTest",
11211121
"arguments": [
11221122
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1149,7 +1149,7 @@
11491149
}
11501150
},
11511151
"command": {
1152-
"title": "Run In Terminal",
1152+
"title": "Run In Terminal",
11531153
"command": "rubyLsp.runTestInTerminal",
11541154
"arguments": [
11551155
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1215,7 +1215,7 @@
12151215
}
12161216
},
12171217
"command": {
1218-
"title": "Run",
1218+
"title": "Run",
12191219
"command": "rubyLsp.runTest",
12201220
"arguments": [
12211221
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1248,7 +1248,7 @@
12481248
}
12491249
},
12501250
"command": {
1251-
"title": "Run In Terminal",
1251+
"title": "Run In Terminal",
12521252
"command": "rubyLsp.runTestInTerminal",
12531253
"arguments": [
12541254
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1314,7 +1314,7 @@
13141314
}
13151315
},
13161316
"command": {
1317-
"title": "Run",
1317+
"title": "Run",
13181318
"command": "rubyLsp.runTest",
13191319
"arguments": [
13201320
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1348,7 +1348,7 @@
13481348
}
13491349
},
13501350
"command": {
1351-
"title": "Run In Terminal",
1351+
"title": "Run In Terminal",
13521352
"command": "rubyLsp.runTestInTerminal",
13531353
"arguments": [
13541354
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1416,7 +1416,7 @@
14161416
}
14171417
},
14181418
"command": {
1419-
"title": "Run",
1419+
"title": "Run",
14201420
"command": "rubyLsp.runTest",
14211421
"arguments": [
14221422
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1449,7 +1449,7 @@
14491449
}
14501450
},
14511451
"command": {
1452-
"title": "Run In Terminal",
1452+
"title": "Run In Terminal",
14531453
"command": "rubyLsp.runTestInTerminal",
14541454
"arguments": [
14551455
"/fixtures/minitest_nested_classes_and_modules.rb",
@@ -1504,7 +1504,5 @@
15041504
}
15051505
}
15061506
],
1507-
"params": [
1508-
1509-
]
1507+
"params": []
15101508
}

0 commit comments

Comments
 (0)