lite-xl / lite-xl

A lightweight text editor written in Lua
https://lite-xl.com
MIT License
4.66k stars 219 forks source link

Can't set the color theme! #678

Closed akefirad closed 2 years ago

akefirad commented 2 years ago

Firstly the documentation says:

Additional color themes can be found in the colors repository. These color themes are bundled with all releases of Lite XL by default.

Is that true? I can find only three color themes; fall, summer, and textadept. Where exactly are themes stored?

More importantly, I can't set the color theme correctly:

-- light theme:
core.reload_module("fall")

But when I open the editor I can see that it couldn't find the theme : init.lua:921: module 'fall' not found:. The paths that the editor tries to find the color theme seems interestingly. Shouldn't it be blah/blah/blah/color/<theme>.lua (in both application and user folders)? (When I copy the theme file to one the paths in the above picture, it works.)

CleanShot 2021-11-19 at 11 14 15

I'm using the latest version 2.0.3 on Mac.

Thanks for the great work and support.

Guldoman commented 2 years ago

Firstly the documentation says:

Additional color themes can be found in the colors repository. These color themes are bundled with all releases of Lite XL by default.

Is that true? I can find only three color themes; fall, summer, and textadept. Where exactly are themes stored?

If you download a prebuilt release, you should have all the color themes integrated. For example download lite-xl-luajit-linux-x86_64.tar.gz from the releases page; inside the archive you can find the directory lite-xl/share/lite-xl/colors/ with 22 color themes.

More importantly, I can't set the color theme correctly:

-- light theme:
core.reload_module("fall")

You have to use

core.reload_module("colors.fall")
akefirad commented 2 years ago

I see. Thanks for the reply.

akefirad commented 2 years ago

But out of curiosity, why are color themes not bundled with other distribution, like .dmg?

Guldoman commented 2 years ago

It looks like a packaging issue. I'll open a bug report.