Lite XL text editor

Moderator: BarryK

Post Reply
User avatar
BarryK
Posts: 2659
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 126 times
Been thanked: 734 times

Lite XL text editor

Post by BarryK »

We have been discussing text editors that support the Zig language in this thread:

"The Zig language"
viewtopic.php?t=12993

Everytime I search for text editors, I find more. Today stumbled upon Lite XL, a real gem.
Posted to my blog, with links to the homepage etc:

"Lite XL text editor"
https://bkhome.org/news/202410/lite-xl-text-editor.html

I had previously found the "Lite" editor, but that is a dead project, stopped about 4 years ago. However, Lite XL is a continuation of Lite.

I have created two PETs, one compiled in Easy Scarthgap, the other in Daedalus. If you want to try the PET, the Daedalus PET will be good for any pup-distro with packages of vintage Debian Bookworm or later. The Scarthgap PET should work on recent pups, like voidpup. PET links:

Scarthgap PET:
https://distro.ibiblio.org/easyos/amd64 ... hgap64.pet

Daedalus PET:
https://distro.ibiblio.org/easyos/amd64 ... alus64.pet

Huge number of plugins; I put what looked like a nice selection into the PETs.

litexl-zig.png
litexl-zig.png (312.12 KiB) Viewed 245 times

In case anyone needs it, this is how I compiled it:

Code: Select all

# meson setup --buildtype=release --prefix=/usr build
# meson compile -C build
# DESTDIR="$(pwd)/lite-xl" meson install --skip-subprojects -C build

...the end result is in folder "lite-xl".

Lite XL will be in the next release of both Easy Daedalus and Scarthgap.
I was going to put in Sublime text editor, but Lite XL is so good, and opensource, whereas Sublime is closed source and not really free.

As Lite XL doesn't have the traditional pull-down menus, you might find it useful to glance through the project's Usage page:

https://lite-xl.com/en/documentation/usage

...however, I found the UI to be intuitive and navigated around without difficulty. It is quite impressive that the GUI is created with SDL2, not using the usual gtk or qt toolkits.

User avatar
BarryK
Posts: 2659
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 126 times
Been thanked: 734 times

Re: Lite XL text editor

Post by BarryK »

There is support for language servers:

https://github.com/lite-xl/lite-xl-lsp-servers

Easy has the 'xls' language server; however, I don't see the need for it. The zig plugin included in the PET already does a pretty good job; not just coloured text, also features such as code-completion.

User avatar
BarryK
Posts: 2659
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 126 times
Been thanked: 734 times

Re: Lite XL text editor

Post by BarryK »

Note that Lite XL is English-only.

It is not a general purpose text editor, it is for programmers, so justifiable I think to be only English.

User avatar
rockedge
Site Admin
Posts: 6509
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2719 times
Been thanked: 2605 times
Contact:

Re: Lite XL text editor

Post by rockedge »

I installed lite-xl-2.1.5-scarthgap64.pet into KLV-Airedale-sr15 and no problems starting the editor.

Although the lite-xl package exists in the Void Linux repos after installing, I noticed that there were no plugins included or fonts or most of what is included in @BarryK's PET packages.

So I tested by installing the Void Linux package AND copied over everything else included in the PET. That works very nicely as well.

So to sum it up. Installing the lite-xl-2.1.5-scarthgap64.pet package directly (manually) into KLV-Airedale-sr15 worked well and installing the official package and the PET together in a hybrid sort of fashion works pretty good as well.

Nice find and packaging BarryK......

williwaw
Posts: 1914
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 169 times
Been thanked: 357 times

Re: Lite XL text editor

Post by williwaw »

The scarthgap .pet linked in Barrys post above, installed in QV without a hitch, while Barrys config seems well done, there are alternate themes including some that offer a dark text on a lighter background.
To see some other themes offered, visit the project page https://github.com/lite-xl
and find the pinned repo https://github.com/lite-xl/lite-xl-colors
clicking on a choice brings up a text file which should be saved as (in this example) /root/.configs/light-xl/colors/solarized_light.lua

open the editor and click on the gearwheel in the bottom right of the file navigaton pane. Your config file, /root/.configs/light-xl/init.lua, will open where you can add line 14 as follows
core.reload_module("colors.solarized_light")
A save[c] with Control-s and your new config will reload

I havent found a theme that suits my eyes quite yet, but lua is advertized to have a simple syntax for making additional edits to your /root/.configs/light-xl/init.lua
you can uncomment a line in init.lua by removing the preceding --
or increase font size by uncommenting line 28 or 29 and changing the value

Post Reply

Return to “EasyOS”