Hi,

As you probably know Leksah currently uses GtkSourceView as its text
edit control and while this is nice we would really prefer to use Yi.
So we have spent some time starting work on adding Yi support.

The first thing we did was to wrap all the GtkSourceView related code
in Leksah so that GtkSourceView is always accessed through a single
module (IDE.TextEditor).  Next we added stubs for a Yi implementation
to the module.  Because Yi has a lot of features that are not in
GtkSourceView this interface will need to be expanded in the future.

I have made a start at a Yi.UI.Pango.Control module based on the code
for Yi.UI.Pango.  It currently just renders the first 20 lines of text
as a test.

The code is in http://code.haskell.org/leksah-head there is a new "yi"
flag (Data.Rope is needed by Yi.UI.Pango.Control so you need to export
Data.Rope from Yi or put the new module in your Yi build).

Once built, check the "Use Yi" box in the Leksah Editor preferences
page (click apply and save) and new files will be opened with the Yi
control. Edit your ~/.leksah/Default.prefs to turn it off if it
crashes before you can get back to preferences.

Some of the things I was unsure about are...

What should the data types be for Buffer, View, Iter, Mark, TagTable,
Tag?

Does Yi have marks for the cursor location and the "selection bound"
or should we refactor our code to ask only for iterators (easily done
I think)?

Do we need a Yi.Window?  How should we create/update it?

Please take a look.  We would love it if you could help us get it up
and running.

Thanks,
Hamish

Links to the relevant code...
http://code.haskell.org/leksah-head/src/IDE/TextEditor.hs
http://code.haskell.org/leksah-head/src/Yi/UI/Pango/Control.hs

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Reply via email to