Definitive Manual

The Developer's Bible: Part 2

The Neovim Engine: Mastering Asynchronous Flow and LSP Integration.

The Latency Crisis in Modern Editors

Most developers spend their day in editors built on Chromium (VSCode, Cursor, Zed). While feature-rich, these editors introduce a fundamental "Input Gap." Between your finger pressing a key and the pixel appearing on the screen, there is a layer of JavaScript, a DOM renderer, and a massive runtime engine. In Tebian, we eliminate this gap. We use Neovim—a C-based engine that treats your code as a high-performance data stream.

This treatise provides the C-level roadmap for building a world-class IDE inside a terminal, focusing on Asynchronous Event Loops and LSP Architecture.

1. The Power of the Async Loop (LuaJIT)

Old Vim was synchronous; if a plugin was slow, the whole editor froze. Neovim changed this by introducing an Asynchronous Job Control system. In Tebian, Neovim is powered by LuaJIT—the world's fastest just-in-time compiler for Lua.

Why LuaJIT over JavaScript?

Lua was designed from day one to be embedded in C programs. It has a tiny footprint and zero-cost interop with C libraries. When you run a search or a linting job in Tebian's Neovim, it happens on a background thread. Your typing (the main UI thread) is never interrupted. This is how we achieve Zero-Latency Editing.

2. LSP: Language Server Protocol as Infrastructure

We believe that "IntelliSense" should not be tied to a specific editor. The Language Server Protocol (LSP), pioneered by Microsoft but weaponized by Neovim, allows the editor to communicate with a dedicated server for each language (Rust-Analyzer, Pyright, Gopls).

The C-Client Advantage

Neovim includes a built-in LSP client written in C. Unlike VSCode, which runs its LSP logic in a separate Node.js process that communicates via JSON-RPC over a socket, Neovim's client is integrated into the core event loop. This reduces the "round-trip" time for completions. In Tebian, we pre-configure Mason.nvim to manage these servers as isolated binaries, ensuring your host OS remains clean.

3. Treesitter: Real-Time Abstract Syntax Trees

Traditional editors use "Regex" for syntax highlighting. This is brittle and slow. Tebian's Neovim uses Tree-sitter, a C-based incremental parsing library. It builds an Abstract Syntax Tree (AST) of your code in real-time.

  • Logical Selection: Select a whole function, a class, or a loop based on its structural meaning, not just line numbers.
  • Instant Highlighting: Because it understands the code structure, highlighting is 100% accurate, even during complex refactors.
  • Incremental Updates: When you type a character, Tree-sitter only updates the part of the tree that changed, using negligible CPU cycles.

4. The Fuzzy Mind: Telescope and Fzf

Navigation in a massive project should be instantaneous. We use Telescope.nvim, a highly extensible fuzzy finder. It integrates with fzf-native (a C-port of the fzf algorithm) to search through 100,000+ files in microseconds.

In Tebian, your editor isn't a "window" you look into; it's a Command Line Interface for your codebase. You don't browse files; you summon them.

Conclusion: The Performance IDE

By moving from VSCode to the Neovim engine, you are reclaiming 1GB of RAM and reducing your input latency by 50ms+. This isn't just about "speed"; it's about the connection between your brain and the code. When the editor disappears, only the logic remains. That is the Tebian Dev Bible. One ISO. One menu. Zero latency.