2

I can get a Gtk.TextView working with the following code—

const Gtk = imports.gi.Gtk;
let mtext1 = new Gtk.TextView();

However, I would rather use a GtkSourceView, as it has line numbers. How can I do this? I can't find much documentation around the subject.

Thanks!

Jacob
  • 1,335
  • 1
  • 14
  • 28

1 Answers1

3

Import the GtkSource library:

const GtkSource = imports.gi.GtkSource;
let mtext1 = new GtkSource.View();
ptomato
  • 56,175
  • 13
  • 112
  • 165