Skip to content

Commit

Permalink
Add glyph for Run code lenses
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Dec 12, 2024
1 parent 896617a commit 4d890ba
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 134 deletions.
4 changes: 2 additions & 2 deletions lib/ruby_lsp/listeners/code_lens.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,15 @@ def add_test_code_lens(node, name:, command:, kind:, id: name)

@response_builder << create_code_lens(
node,
title: "Run",
title: "Run",
command_name: "rubyLsp.runTest",
arguments: arguments,
data: { type: "test", **grouping_data },
)

@response_builder << create_code_lens(
node,
title: "Run In Terminal",
title: "Run in Terminal",
command_name: "rubyLsp.runTestInTerminal",
arguments: arguments,
data: { type: "test_in_terminal", **grouping_data },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -46,7 +46,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -114,7 +114,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -147,7 +147,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -213,7 +213,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -246,7 +246,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -312,7 +312,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -346,7 +346,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -414,7 +414,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -447,7 +447,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -513,7 +513,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -547,7 +547,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -615,7 +615,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -648,7 +648,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -714,7 +714,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -747,7 +747,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -813,7 +813,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -847,7 +847,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -915,7 +915,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -948,7 +948,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1014,7 +1014,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1048,7 +1048,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1116,7 +1116,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1149,7 +1149,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1215,7 +1215,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1248,7 +1248,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1314,7 +1314,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1348,7 +1348,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1416,7 +1416,7 @@
}
},
"command": {
"title": "Run",
"title": "Run",
"command": "rubyLsp.runTest",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1449,7 +1449,7 @@
}
},
"command": {
"title": "Run In Terminal",
"title": "Run in Terminal",
"command": "rubyLsp.runTestInTerminal",
"arguments": [
"/fixtures/minitest_nested_classes_and_modules.rb",
Expand Down Expand Up @@ -1504,7 +1504,5 @@
}
}
],
"params": [

]
"params": []
}
Loading

0 comments on commit 4d890ba

Please sign in to comment.