diff options
Diffstat (limited to 'src/nvim/README.md')
-rw-r--r-- | src/nvim/README.md | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/nvim/README.md b/src/nvim/README.md index 3032913500..660e3d1010 100644 --- a/src/nvim/README.md +++ b/src/nvim/README.md @@ -1,14 +1,19 @@ -## Source code overview -This document is an overview of how Nvim works internally, focusing on parts -that are different from Vim. Since Nvim inherited from Vim, some information in -[its README](https://raw.githubusercontent.com/vim/vim/master/src/README.txt) -still applies. +Module-specific details are documented at the top of each module (e.g. +terminal.c, screen.c). -For module-specific details, read the source code. Some files are extensively -commented at the top (e.g. terminal.c, screen.c). +See also `:help development`. -### Source file name conventions +UI Debugging +------------ + +At `DEBUG_LOG_LEVEL`, all UI events are logged. + + rm -rf build/ + make CMAKE_EXTRA_FLAGS="-DMIN_LOG_LEVEL=0" + +Filename conventions +-------------------- The source files use extensions to hint about their purpose. @@ -19,10 +24,12 @@ The source files use extensions to hint about their purpose. - `*.h.generated.h` - exported functions’ declarations. - `*.c.generated.h` - static functions’ declarations. -### Top-level program loops +Nvim lifecycle +-------------- + +Following describes how Nvim processes input. -Let's understand what a Vim-like program does by analyzing the workflow of -a typical editing session: +Consider a typical Vim-like editing session: 01. Vim dispays the welcome screen 02. User types: `:` @@ -154,7 +161,8 @@ modes managed by the `state_enter` loop: - insert mode: `insert_{enter,check,execute}()`(`edit.c`) - terminal mode: `terminal_{enter,execute}()`(`terminal.c`) -### Async event support +Async event support +------------------- One of the features Nvim added is the support for handling arbitrary asynchronous events, which can include: |