davidbalbert / Watt

A high performance text editor for macOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Watt

A high performance text editor for macOS. Not ready for production use.

See this YouTube playlist for info on how Watt works.

Features

  • Fast text storage: a copy-on-write B-tree based rope with O(log n) access and mutation.
  • A fast, Core Animation based text view. Only draws lines in the viewport, and doesn't redraw on scroll.
  • Full Unicode support (extended grapheme clusters, emoji sequences, skin tone modifiers, etc.).
  • Monospaced and proportional typefaces.
  • A files sidebar supporting live updates, drag and drop, and file renaming.
  • System key bindings and IMEs (emoji picker, Romaji, marked text, etc.).
  • macOS integration: autosave, file history, reload on change, proxy icons, concurrent file loading, etc.
  • Syntax highlighting using Tree-sitter (only C for now).
  • System appearance support (dark mode, etc.).
  • Themes.

What's missing

  • Non-wrapped text.
  • Multiple cursors.
  • Auto indent.
  • LSP support: autocomplete, jump to definition, show callers, etc.
  • Split views and tabs.
  • Encodings besides UTF-8.
  • Find in File and Find in Project.
  • GitHub Copilot.
  • Performance improvements:
    • Fast layout for documents with no line breaks – don't draw visual lines that are outside the viewport.
    • Virtualized document height estimation – don't store heights of lines outside the viewport.
    • Don't block the UI when opening large files – load them piecemeal instead.
    • Don't block the UI when saving large files – use AppKit's asynchronous file writing support.
    • Efficient diff-based file reloading.

Points of interest

Getting started

  • Clone this repository.
  • Run git submodule update --init.
  • Copy Developer.xcconfig.example to Developer.xcconfig and set CODE_SIGN_IDENTITY and DEVELOPMENT_TEAM appropriately.
  • Open Watt.xcodeproj in Xcode.

License

Watt is copyright David Albert and released under the terms of the MIT License. See LICENSE.txt for details.

Acknowledgements

Portions of Watt are adapted from the following projects. See ACKNOWLEDGEMENTS.md for license information.

About

A high performance text editor for macOS.

License:MIT License


Languages

Language:Swift 99.8%Language:Objective-C 0.2%Language:C 0.0%Language:Python 0.0%