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

Bernardo Magri b9eeba41b5 Initial commit преди 1 месец
src b9eeba41b5 Initial commit преди 1 месец
tests b9eeba41b5 Initial commit преди 1 месец
CMakeLists.txt b9eeba41b5 Initial commit преди 1 месец
LUA_API.md b9eeba41b5 Initial commit преди 1 месец
README.md b9eeba41b5 Initial commit преди 1 месец
init.lua b9eeba41b5 Initial commit преди 1 месец
shell.nix b9eeba41b5 Initial commit преди 1 месец

README.md

Lumacs

A modern text editor in C++, inspired by Emacs but with better scripting via Lua.

Features (Planned)

  • Modern C++20 codebase with RAII principles
  • Terminal UI using FTXUI
  • Lua scripting with sol2
  • Window splits and buffer management
  • Extensible architecture

Tech Stack

  • Core: C++20 with modern idioms
  • TUI: FTXUI for terminal rendering
  • Scripting: Lua 5.4 + sol2 bindings
  • Build: CMake 3.20+
  • Text Storage: std::vector<std::string> (MVP), rope structure planned

Building

Standard Build

mkdir build && cd build
cmake ..
cmake --build .
./lumacs [file]

With Nix

nix-shell
mkdir build && cd build
cmake -G Ninja ..
ninja
./lumacs [file]

Build Options

  • Debug build: cmake -DCMAKE_BUILD_TYPE=Debug ..
  • Release build: cmake -DCMAKE_BUILD_TYPE=Release .. (default)

Project Structure

lumacs/
├── include/lumacs/    # Public headers
│   └── buffer.hpp     # Text buffer interface
├── src/               # Implementation
│   ├── main.cpp       # Entry point
│   └── buffer.cpp     # Buffer implementation
├── tests/             # Unit tests (TODO)
├── CMakeLists.txt     # Build configuration
└── shell.nix          # Nix development environment

Current Status

MVP Phase: Basic infrastructure in place

  • Project structure and build system
  • Buffer implementation with basic operations
  • Minimal FTXUI integration
  • Lua runtime initialized
  • Keyboard input handling
  • Window splits
  • Lua configuration loading
  • Basic editing commands

Development

The project uses modern C++ practices:

  • RAII for resource management
  • Smart pointers for ownership
  • std::optional for fallible operations
  • Range-based operations
  • C++20 features (spaceship operator, etc.)

License

TBD