Leksah FAQ

From HaskellWiki
Jump to navigation Jump to search

This is FAQ for the Leksah IDE.

The cross [x] buttons on tabs are almost invisible (don't fit in tabs)

With version 0.6 and later for a pleasant visual appearance, you have to copy or append the .gtkrc-2.0 file from the Leksah data folder or from the data folder in Leksah sources to your home folder. (Manual 7)

That's not a global change, but leksah specific parameter that can't be set in another way, as far as I know.

To install leksah's gtkrc in Linux for the current user:

$ cd ~
$ wget http://code.haskell.org/leksah-head/leksah/data/.gtkrc-2.0 -O .gtkrc-2.0-leksah
$ echo -e '\ninclude ".gtkrc-2.0-leksah"' >> .gtkrc-2.0

The [X] button on the toolbar behaves in a counterintuitive way (I expected it to close source editor tabs not modules/debugging/... tabs). Is it really needed?

Well we have made a concept, where you are basically free to rearrange every part of the Leksah window. So you are free to close every pane.

When I work this is my rescue:

In Leksah there may be an active pane. The name of this pane is displayed in the second compartment from the left side in the status bar. Some actions like moving, splitting, closing panes or finding or replacing items in a text buffer act on the current pane, so check the display in the status bar to see if the pane you want to act on, is really the active one. (Manual 33)

Name completion popup sometimes goes beyond the bottom edge of the window/screen

True.

Debugging doesn't work if ~/.cabal/bin is not in the path - "Setup: Cannot find the program 'ghc' at 'leksahecho' or on the path" (does it mean that it can't find leksahecho?)

True. Not sure what it is really searching, but it needs to find both programs.

Does importing some module need its package to be specified in dependencies first? Would it be possible to automatically add package to dependencies if I wanted to use something from it?

The import helper just looks in imported packages, so if you miss a package import, you have to fix it manually. It would be an interesting feature for the future.

Adding dependencies from packages installed by cabal doesn't seem to work: "Setup: At least the following dependencies are missing: some_package", while doing "~/.cabal/bin/cabal configure" in the package directory runs normally. I have some_package installed in my home directory by cabal-install

This is because cabal install uses the per user database of haskell packages, while the default is the machine database. So you have to add --user to the ConfigFlags in Package / Package Flags.

Note: "--user" was made the default in the releases > 0.6.1.

After opening the leksah.cabal package, the Package/Edit Package menu item doesn't work

As of version 0.6 "Cabal file with configurations can't be edited with the current version of the editor" (this is printed to stdout in the background).

What font to use with Leksah?

Envy code R and Terminus seem to be a good match with Leksah.

Is it possible to change the editor color scheme / background color?

Yes. Leksah is based on GtkSourceView and supports the same color schemes as for example gedit. The schemes can be set in preferences, editor -> editor style.

Where is the list of default keybindings?

The keybindings can be configured by editing the .keymap file (name of the file is specified in preferences -> GUI options -> name of the keymap.

The default keymap file is here. You could make your own by copying the default one to your ~/.leksah under a different name.

There is "Goto definition" in the modules pane. Is there also goto definition in the editor window?

AFAIK, there is no 'direct' one ATM, but you could select the identifier text, use "Search (metadata)" from the right-click context menu and then right-click on one of the results to go to its definition.

Also, holding down ctrl and double clicking on identifier in the code editor finds it in the module pane (if the results are unambiguous) and falls back on standard search otherwise (from Hamish).

I'm having troubles linking Leksah against gtksourceview. I've installed gtk2hs but am not sure whether/where to specify the library search path for ld

Here is the output I get:

Linking dist\build\leksah\leksah.exe ...
C:\app\Haskell_Platform\2009.2.0.1\gcc-lib\ld.exe: cannot find -lgtksourceview-2.0

solution from Tobias Bexelius (with minor edits):

I downloaded the latest devlopment version binaries for windows from http://ftp.gnome.org/pub/gnome/binaries/win32/gtksourceview/2.6/gtksourceview-dev-2.6.2.zip (the official download page is at http://projects.gnome.org/gtksourceview/download.html) and put the libgtksourceview-2.0.dll.a file in a lib directory that the GCC compiler knows about (I use Mingw so i put it in the library folder found there). I was then able to compile Leksah (after changing the regex dependencies as reported earlier on this mailinglist).

I have a problem with autocompletion. I can see StartComplete in status bar, but dialog *never* appears.

It probably depends on what you are trying to autocomplete. AFAIK, for Leksah to know names from some module, you have to add its package to dependencies, configure package and import the module in your code.