Search code examples
rubygithub-copilot

Is it possible to generate a GitHub Copilot suggestion based on a natural language comment in Ruby?


The only examples in the Copilot docs I see for natural language code suggestions are for javascript. Is it possible to do this type of thing with a Ruby comment?

// find all images without alternate text
// and give them a red border
function process() {

If so, how?


Solution

  • Just what you're doing in JS and it should work. I just wrote the comment, it suggested the method name, I tabbed, it suggested the method body:

    enter image description here