module RBS::DetailedMessageable

def detailed_message(highlight: false, **)

def detailed_message(highlight: false, **)
  indent = " " * location.start_column
  marker = "^" * (location.end_column - location.start_column)
  io = StringIO.new
  io.puts super
  io.puts
  io.print "\e[1m" if highlight
  io.puts "  #{location.buffer.lines[location.end_line - 1]}"
  io.puts "  #{indent}#{marker}"
  io.print "\e[m" if highlight
  io.string
end