| 12345678910111213141516171819202122232425262728293031323334353637 |
- -- Theme configuration for Lumacs
- -- This file demonstrates how to configure and switch themes from Lua
- function switch_to_everforest()
- editor:set_theme("everforest-dark")
- message("Switched to Everforest dark theme")
- end
- function switch_to_default()
- editor:set_theme("default")
- message("Switched to default theme")
- end
- function switch_to_dracula()
- editor:set_theme("dracula")
- message("Switched to Dracula theme")
- end
- function list_themes()
- local themes = editor.theme_manager:theme_names()
- local theme_list = "Available themes: "
- for i, name in ipairs(themes) do
- theme_list = theme_list .. name
- if i < #themes then
- theme_list = theme_list .. ", "
- end
- end
- message(theme_list)
- end
- -- Key bindings for theme switching
- bind_key("C-x t e", switch_to_everforest)
- bind_key("C-x t d", switch_to_default)
- bind_key("C-x t v", switch_to_dracula)
- bind_key("C-x t l", list_themes)
- print("Theme configuration loaded")
|