66 Building
Jesse Aldridge edited this page 2018-01-26 23:20:35 -08:00

We'll go through how to set up Lime for development here. If you have trouble, try the Troubleshooting page, or one of the platform specific instruction sets below.

Supplemental Platform Specific Instructions

The instructions here should be complete (if missing some platform specific details), and are periodically updated by the maintainers. Specific instructions exist for certain platforms, but they are frequently out of date, so use with caution.

Dependencies

You will need the following installed before you start:

  • Git
  • Go 1.5
  • Python 3.5
  • Oniguruma

You should also make yourself familiar with writing code in Go.

We also use Glide to pin Go dependencies, but it can be considered optional (and these instructions won't use it).

Backend

The backend is the core of Lime Text. All frontends rely on it.

go get -v -u github.com/limetext/backend/...

Note: I also had to do this:

go get -v -u github.com/limetext/sublime

Now make sure it installed correctly by running the tests.

cd ${GOPATH:-~/go}/src/github.com/limetext/backend
make test

Frontends

Limetext has a QML, an HTML and a termbox frontend. The main focus is on the QML frontend.

QML

The QML frontend requires Qt5 with the development files.

go get github.com/limetext/lime-qml/main/...

If building qml-go fails with fatal error: QtCore/private/qglobal_p.h: No such file or directory see qml-go#6.

cd $GOPATH/src/github.com/limetext/lime-qml
git submodule update --init --recursive

To build and run:

cd $GOPATH/src/github.com/limetext/lime-qml/main
go build
./main

Quit with Ctrl + Q.

Termbox

go get github.com/limetext/lime-termbox/main/...
cd $GOPATH/src/github.com/limetext/lime-termbox
git submodule update --init --recursive

To build and run:

cd $GOPATH/src/github.com/limetext/lime-termbox/main
go build
./main main.go

Quit with Ctrl + Q.

HTML

go get github.com/limetext/lime-html/main/...
cd $GOPATH/src/github.com/limetext/lime-html
git submodule update --init --recursive

To build and run:

cd $GOPATH/src/github.com/limetext/lime-html/main
go build
./main

Open localhost:8080 with your browser.