A text editor inspired by Emacs with Lua at it's core

Bernardo Magri 5264f0a0da feat(ui): implement click-to-move cursor 1 месяц назад
documentation fe5b02f3ec fix: Resolve major GTK4 frontend rendering and input issues 1 месяц назад
examples cd92b269df Organize repository structure for better maintainability 1 месяц назад
include ba41a81b99 feat(ui): implement scroll wheel support 1 месяц назад
scripts 5db16fd31a fix(gtk): redraw all windows after input 1 месяц назад
src 5264f0a0da feat(ui): implement click-to-move cursor 1 месяц назад
tests d71a98ae83 Implement M-d (kill-word) and M-Backspace (backward-kill-word) 1 месяц назад
.envrc 4f1529bcf9 switching to ncurses 1 месяц назад
.gitignore 5114a45098 Start Phase 6: GTK4 Frontend and Single Binary Architecture 1 месяц назад
CLAUDE.md fe5b02f3ec fix: Resolve major GTK4 frontend rendering and input issues 1 месяц назад
CMakeLists.txt 0811fc1a7b Phase 6: Working GTK4 Prototype with Input and Rendering 1 месяц назад
DEV_STATE.md 15759565d0 docs: complete phase 7 1 месяц назад
PROMPT.md bc33ffb8b5 fix(gtk): resolve window split crashes and text rendering issues 1 месяц назад
README.md 52125a0322 Phase 6 Progress: GTK4 Prototype functional (Input/Output/Lua) 1 месяц назад
init.lua fe5b02f3ec fix: Resolve major GTK4 frontend rendering and input issues 1 месяц назад
shell.nix f50c65e891 starting the plan for a GUI 1 месяц назад
themes.lua 0811fc1a7b Phase 6: Working GTK4 Prototype with Input and Rendering 1 месяц назад

README.md

Lumacs

A modern text editor in C++20, inspired by Emacs with powerful Lua scripting support.

Features

Implemented (Phase 4 Complete - 95% Emacs Compatibility)

  • Core Editing: Kill ring, mark/region, undo/redo
  • Buffer Management: Multiple buffers, window splits
  • Advanced Features: Registers, keyboard macros, rectangles, minibuffer history
  • Search: Incremental search with highlighting
  • Theme System: Dracula, Everforest, and default themes with proper background colors
  • Per-Window Modelines: Configurable status bars for each buffer
  • Lua Scripting: Extensive Lua API for customization

🔄 Planned

  • Language modes (Python, C++, JavaScript)
  • Plugin system expansion
  • Performance optimizations

Tech Stack

  • Core: C++20 with modern idioms and ncurses
  • Scripting: Lua 5.4 + sol2 bindings
  • Build: CMake 3.20+
  • Themes: RGB color support with fallbacks

Quick Start

Building

./scripts/build.sh

Running

./build/lumacs [file]

Key Bindings

  • Theme Switching: C-x t v (Dracula), C-x t e (Everforest), C-x t d (Default)
  • Window Splits: C-x 2 (horizontal), C-x 3 (vertical), C-x 0 (close)
  • Buffers: C-x b (switch), C-x k (kill), C-x C-b (list)
  • Advanced: F3/F4 (macros), C-x r s/i (registers), C-x r k/y/t (rectangles)

Manual Build

mkdir build && cd build
cmake ..
cmake --build .

With Nix

nix-shell
./scripts/build.sh

Project Structure

lumacs/
├── src/                    # Core implementation
│   ├── main_ncurses.cpp   # ncurses frontend
│   ├── editor_core.cpp    # Editor engine
│   ├── theme.cpp          # Theme system
│   └── lua_api.cpp        # Lua scripting API
├── include/lumacs/         # Public headers
│   ├── editor_core.hpp    # Editor core interface
│   ├── theme.hpp          # Theme system
│   └── lua_api.hpp        # Lua API headers
├── tests/                  # Unit tests
├── scripts/                # Build and utility scripts
├── examples/               # Test files and examples
├── documentation/          # Detailed documentation
├── init.lua               # Main configuration
├── themes.lua             # Theme definitions
└── CMakeLists.txt         # Build configuration

Development

Current Status: Phase 6 In Progress - GTK4 Frontend Prototype

The project uses modern C++ practices:

  • RAII for resource management
  • Smart pointers for ownership
  • std::optional for fallible operations
  • Modern C++20 features
  • Decoupled UI architecture (IEditorView)
  • Dual Frontend (TUI + GTK4)

Testing

./scripts/test.sh

Customization

  • Edit init.lua for keybindings and configuration
  • Edit themes.lua for theme customization
  • Add new themes in src/theme.cpp

Documentation

  • README.md - This file
  • CONTINUATION_PROMPT.md - Development continuation guide
  • documentation/ - Detailed feature documentation
  • examples/ - Test files and usage examples

License

TBD