# uitdots/nvim architecture

> Architecture diagram of the GitHub repository uitdots/nvim, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/uitdots/nvim
- Repository: https://github.com/uitdots/nvim

## Overview

1. **What this repo is**
   This is a Neovim IDE configuration, not an application. The runtime is Neovim itself, and the repo organizes editor behavior into a layered config: core editor settings, plugin specifications, plugin-specific configs, and filetype/LSP overrides.

2. **Startup and bootstrap path**
   `init.lua` and `lua/core/*` define the base editor state first: options, globals, environment, keymaps, autocmds, highlights, and custom commands. After that, `lua/configs/lazy/*` and `lua/plugins/init.lua` hand control to `lazy.nvim`, which is the main plugin loader and dependency orchestrator.

3. **Core editor boundary**
   The `lua/core` layer is the “always-on” foundation. It is where native Neovim behavior is established before any plugin logic runs, including register helpers, file cleanup commands, package/bootstrap helpers, and global toggles such as the `NVIM_NO_IDE` escape hatch mentioned in the README.

4. **Plugin architecture: main vs extras**
   The plugin system is split into `lua/plugins/main` and many optional groups under `lua/plugins/*`. `main` contains the non-negotiable UX backbone: NvChad UI, file tree, fuzzy finding, buffer/tab UI, completion, and Treesitter. The rest are feature groups that can be enabled or disabled more independently.

5. **Language packs as the main composition unit**
   `lua/plugins/languages/*` is the largest subsystem. Each language folder bundles the relevant editor capabilities for that language: formatter, linter, parser, LSP client, debugger, test adapters, and sometimes language-specific tooling. This is the main architecture pattern in the repo: “one language = one coordinated stack.”

6. **Language toolchain flow**
   The usual flow for a file is: filetype detection via `ftdetect/` and Treesitter queries, then language-specific plugin specs load, then Mason installs/activates external binaries, and finally Neovim wires formatter/linter/LSP/DAP support. This is why many language packs include `conform`, `nvim-lint`, `nvim-treesitter`, `mason-tool-installer`, and sometimes `nvim-dap` or test plugins.

7. **LSP subsystem**
   `lua/configs/lsp` and `after/lsp/*` define the LSP behavior and server overrides. The repo uses `nvim-lspconfig` plus per-server config files for servers such as `gopls`, `pyright`, `rust_analyzer`, `tsgo`, `vtsls`, `jdtls`, `clangd`, `lua_ls`, `yamlls`, and others. `after/lsp` acts as the late override boundary for server-specific tuning.

8. **Diagnostics, formatting, and linting**
   Diagnostics are centralized in `lua/configs/diagnostic`, while formatting and linting are plugin-driven through `conform.nvim` and `nvim-lint`. The README notes that compound filetypes are handled differently here: linting can run on them, and formatting follows the last filetype in the compound chain.

9. **Debugging and test execution**
   Debugging is handled by the `dap` subsystem under `lua/configs/dap` and `lua/plugins/dap`, with adapters for browser, Node, C/C++, and other language-specific setups. Testing is a separate layer under `lua/plugins/test`, while `overseer` templates and the built-in runner under `lua/configs/runner` provide task/file execution paths.

10. **UI and interaction layer**
   The UI is built around NvChad plus several auxiliary plugins in `lua/plugins/ui`, `lua/plugins/motion`, and `lua/plugins/others`. These add statusline/tabline behavior, completion menu polish, notifications, window navigation, motions, session handling, git indicators, and command surfaces like Telescope and Snacks.

11. **AI, database, and external integrations**
   There are dedicated integration groups for AI (`codecompanion`, Copilot, MCP, VectorCode), databases (`vim-dadbod`, completion, UI), git, and remote/dev tooling like Chezmoi. These are not core editor functions; they are feature islands wired into Neovim through plugins and keymaps.

12. **Treesitter and syntax extension boundary**
   `after/queries/*` and `after/syntax/*` customize parsing and highlighting beyond upstream Treesitter defaults. This repo uses these overrides for language-specific injections and highlight behavior, especially where embedded languages or nonstandard grammars need special handling.

13. **Support assets and authoring tools**
   `snippets/`, `spell/`, `prompts/`, and custom ftplugins provide editing assets rather than runtime features. They support completion, spelling, template insertion, and filetype-specific behavior, which makes them part of the authoring experience layer.

14. **Practical architecture summary**
   If you draw the diagram, the main dependency directions are: Neovim core → lazy.nvim plugin graph → language/UI/tooling plugins → external binaries and services via Mason/LSP/DAP/task runners. `after/` directories and `ftplugin/` act as late-stage override points, while `utils/` and `types/` support the whole system without being user-facing features.

Main entry points: [`lua/plugins/init.lua`](https://github.com/uitdots/nvim/blob/main/lua/plugins/init.lua) (Plugins init), [`lua/plugins/languages`](https://github.com/uitdots/nvim/tree/main/lua/plugins/languages) (Languages), [`init.lua`](https://github.com/uitdots/nvim/blob/main/init.lua) (init.lua), [`lua/configs/lazy`](https://github.com/uitdots/nvim/tree/main/lua/configs/lazy) (Lazy boot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_core["Core startup"]
  node_init["init.lua<br/>entry<br/>[init.lua]"]
  node_core_options["Core opts<br/>neovim core"]
  node_core_package["Package boot<br/>bootstrap<br/>[package.lua]"]
end

subgraph group_group_plugins["Plugin graph"]
  node_lazy_boot["Lazy boot<br/>plugin loader"]
  node_plugins_init["Plugins init<br/>plugin specs<br/>[init.lua]"]
  node_plugins_main["Main stack<br/>ui backbone"]
  node_plugins_ui["UI layer<br/>interaction"]
  node_plugins_motion["Motion layer<br/>editing motion"]
  node_plugins_others["Tooling layer<br/>integrations"]
  node_lsp_core["LSP core<br/>lsp subsystem"]
  node_diag_fmt_lint["Diag/Fmt/Lint<br/>code quality"]
  node_dap_core["DAP core<br/>debug subsystem"]
  node_runner_core["Runner core<br/>task runner"]
  node_overseer_tpl["Task templates"]
end

subgraph group_group_languages["Language packs"]
  node_languages_hub["Languages<br/>language packs"]
  node_lang_go["Go pack<br/>language stack"]
  node_lang_python["Python pack<br/>language stack"]
  node_lang_ts["TS pack<br/>language stack"]
  node_lang_java["Java pack<br/>language stack"]
  node_lang_yaml["YAML pack<br/>language stack"]
  node_lang_sql["SQL pack<br/>language stack"]
end

subgraph group_group_overrides["Late overrides"]
  node_after_lsp["LSP overrides<br/>late overrides"]
  node_after_queries["Tree-sitter queries<br/>syntax overrides"]
  node_after_ft["Ft plugins<br/>filetype overrides"]
end

subgraph group_group_support["Support assets"]
  node_assets["Assets"]
end

node_init -->|"loads"| node_core_options
node_init -->|"bootstraps"| node_core_package
node_init -->|"hands off"| node_lazy_boot
node_lazy_boot -->|"loads"| node_plugins_init
node_plugins_init -->|"includes"| node_plugins_main
node_plugins_init -->|"includes"| node_plugins_ui
node_plugins_init -->|"includes"| node_plugins_motion
node_plugins_init -->|"includes"| node_plugins_others
node_plugins_init -->|"includes"| node_languages_hub
node_languages_hub -->|"specializes"| node_lang_go
node_languages_hub -->|"specializes"| node_lang_python
node_languages_hub -->|"specializes"| node_lang_ts
node_languages_hub -->|"specializes"| node_lang_java
node_languages_hub -->|"specializes"| node_lang_yaml
node_languages_hub -->|"specializes"| node_lang_sql
node_plugins_init -->|"enables"| node_lsp_core
node_plugins_init -->|"enables"| node_diag_fmt_lint
node_plugins_init -->|"enables"| node_dap_core
node_plugins_init -->|"enables"| node_runner_core
node_runner_core -->|"extends"| node_overseer_tpl
node_lsp_core -->|"overrides"| node_after_lsp
node_plugins_init -->|"extends"| node_after_queries
node_plugins_init -->|"applies"| node_after_ft
node_plugins_init -->|"uses"| node_assets
node_plugins_init -->|"depends on"| node_core_options
node_plugins_init -->|"depends on"| node_core_package

click node_init "https://github.com/uitdots/nvim/blob/main/init.lua"
click node_core_options "https://github.com/uitdots/nvim/tree/main/lua/core"
click node_core_package "https://github.com/uitdots/nvim/blob/main/lua/core/package.lua"
click node_lazy_boot "https://github.com/uitdots/nvim/tree/main/lua/configs/lazy"
click node_plugins_init "https://github.com/uitdots/nvim/blob/main/lua/plugins/init.lua"
click node_plugins_main "https://github.com/uitdots/nvim/tree/main/lua/plugins/main"
click node_plugins_ui "https://github.com/uitdots/nvim/tree/main/lua/plugins/ui"
click node_plugins_motion "https://github.com/uitdots/nvim/tree/main/lua/plugins/motion"
click node_plugins_others "https://github.com/uitdots/nvim/tree/main/lua/plugins/others"
click node_languages_hub "https://github.com/uitdots/nvim/tree/main/lua/plugins/languages"
click node_lang_go "https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/go"
click node_lang_python "https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/python"
click node_lang_ts "https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/typescript"
click node_lang_java "https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/java"
click node_lang_yaml "https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/yaml"
click node_lang_sql "https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/sql"
click node_lsp_core "https://github.com/uitdots/nvim/tree/main/lua/configs/lsp"
click node_diag_fmt_lint "https://github.com/uitdots/nvim/tree/main/lua/configs/diagnostic"
click node_dap_core "https://github.com/uitdots/nvim/tree/main/lua/configs/dap"
click node_runner_core "https://github.com/uitdots/nvim/tree/main/lua/configs/runner"
click node_overseer_tpl "https://github.com/uitdots/nvim/tree/main/lua/overseer/template/default"
click node_after_lsp "https://github.com/uitdots/nvim/tree/main/after/lsp"
click node_after_queries "https://github.com/uitdots/nvim/tree/main/after/queries"
click node_after_ft "https://github.com/uitdots/nvim/tree/main/ftplugin"
click node_assets "https://github.com/uitdots/nvim/tree/main/snippets"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_init,node_core_options,node_core_package toneBlue
class node_lazy_boot,node_plugins_init,node_plugins_main,node_plugins_ui,node_plugins_motion,node_plugins_others,node_lsp_core,node_diag_fmt_lint,node_dap_core,node_runner_core,node_overseer_tpl toneAmber
class node_languages_hub,node_lang_go,node_lang_python,node_lang_ts,node_lang_java,node_lang_yaml,node_lang_sql toneMint
class node_after_lsp,node_after_queries,node_after_ft toneRose
class node_assets toneIndigo
```

## Components

### Core startup

Always-on Neovim foundation loaded before plugins.

- [init.lua](https://github.com/uitdots/nvim/blob/main/init.lua): entry · Bootstraps the config and hands off to core setup and plugin loading. · `init.lua`
- [Core opts](https://github.com/uitdots/nvim/tree/main/lua/core): neovim core · Editor options, globals, environment, highlights, keymaps, autocmds, and commands. · `lua/core`
- [Package boot](https://github.com/uitdots/nvim/blob/main/lua/core/package.lua): bootstrap · Package/bootstrap helpers and escape-hatch toggles for the IDE layer. · `lua/core/package.lua`

### Plugin graph

lazy.nvim-managed plugin specifications and feature groups.

- [Lazy boot](https://github.com/uitdots/nvim/tree/main/lua/configs/lazy): plugin loader · lazy.nvim initialization and plugin-loading configuration. · `lua/configs/lazy`
- [Plugins init](https://github.com/uitdots/nvim/blob/main/lua/plugins/init.lua): plugin specs · Top-level plugin graph assembly and grouping entrypoint. · `lua/plugins/init.lua`
- [Main stack](https://github.com/uitdots/nvim/tree/main/lua/plugins/main): ui backbone · Non-optional UI and workflow backbone: tree, finder, bufferline, completion, treesitter, and theme integration. · `lua/plugins/main`
- [UI layer](https://github.com/uitdots/nvim/tree/main/lua/plugins/ui): interaction · Statusline, notifications, windows, menus, delimiters, and visual affordances. · `lua/plugins/ui`
- [Motion layer](https://github.com/uitdots/nvim/tree/main/lua/plugins/motion): editing motion · Navigation and structural editing helpers such as surround, flash, align, and textobject tools. · `lua/plugins/motion`
- [Tooling layer](https://github.com/uitdots/nvim/tree/main/lua/plugins/others): integrations · Task runners, git helpers, file utilities, sessions, spell, and miscellaneous editor integrations. · `lua/plugins/others`
- [LSP core](https://github.com/uitdots/nvim/tree/main/lua/configs/lsp): lsp subsystem · Central LSP behavior, autocommands, and server wiring built on nvim-lspconfig. · `lua/configs/lsp`
- [Diag/Fmt/Lint](https://github.com/uitdots/nvim/tree/main/lua/configs/diagnostic): code quality · Central diagnostics plus formatter and linter orchestration. · `lua/configs/diagnostic`
- [DAP core](https://github.com/uitdots/nvim/tree/main/lua/configs/dap): debug subsystem · Debugger adapters, configurations, and helper utilities. · `lua/configs/dap`
- [Runner core](https://github.com/uitdots/nvim/tree/main/lua/configs/runner): task runner · Command execution and file/task runner definitions. · `lua/configs/runner`
- [Task templates](https://github.com/uitdots/nvim/tree/main/lua/overseer/template/default): task templates · Overseer templates for language-specific task execution. · `lua/overseer/template/default`

### Language packs

Per-language stacks that compose parsers, LSP, formatters, linters, DAP, and tests.

- [Languages](https://github.com/uitdots/nvim/tree/main/lua/plugins/languages): language packs · Entrypoint for per-language plugin bundles and shared language tooling. · `lua/plugins/languages`
- [Go pack](https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/go): language stack · Go-specific parser, formatter, linting, debugging, tests, tags, and build helpers. · `lua/plugins/languages/go`
- [Python pack](https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/python): language stack · Python-specific parser, formatter, linting, DAP, venv selection, and typeshed support. · `lua/plugins/languages/python`
- [TS pack](https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/typescript): language stack · TypeScript/JavaScript stack with linting, formatting, debugger, and test adapters. · `lua/plugins/languages/typescript`
- [Java pack](https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/java): language stack · Java and JVM tooling centered on JDTLS, build tooling, and test integration. · `lua/plugins/languages/java`
- [YAML pack](https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/yaml): language stack · YAML parser, formatter, linting, and schema-aware editing support. · `lua/plugins/languages/yaml`
- [SQL pack](https://github.com/uitdots/nvim/tree/main/lua/plugins/languages/sql): language stack · SQL editing support with database tooling and server integration. · `lua/plugins/languages/sql`

### Late overrides

Filetype, syntax, and server-specific override boundaries.

- [LSP overrides](https://github.com/uitdots/nvim/tree/main/after/lsp): late overrides · Per-server override files applied after the main LSP configuration. · `after/lsp`
- [Tree-sitter queries](https://github.com/uitdots/nvim/tree/main/after/queries): syntax overrides · Custom injections and highlights extending upstream Tree-sitter behavior. · `after/queries`
- [Ft plugins](https://github.com/uitdots/nvim/tree/main/ftplugin): filetype overrides · Filetype-specific editor behavior and cleanup helpers. · `ftplugin`

### Support assets

Editing assets and shared utilities used across the config.

- [Assets](https://github.com/uitdots/nvim/tree/main/snippets): editing assets · Snippets, spelling additions, and prompt templates supporting authoring workflows. · `snippets`

## Connections

- init.lua → Core opts: loads · Establishes core editor state first.
- init.lua → Package boot: bootstraps · Initializes package/bootstrap helpers and environment toggles.
- init.lua → Lazy boot: hands off · Delegates plugin orchestration to lazy.nvim.
- Lazy boot → Plugins init: loads · Builds the plugin graph from grouped specs.
- Plugins init → Main stack: includes · Loads the non-optional UX backbone.
- Plugins init → UI layer: includes · Adds UI and interaction plugins.
- Plugins init → Motion layer: includes · Adds motion and structural-editing helpers.
- Plugins init → Tooling layer: includes · Adds task, git, session, and utility integrations.
- Plugins init → Languages: includes · Composes language packs as a major subsystem.
- Languages → Go pack: specializes · Bundles the Go toolchain stack.
- Languages → Python pack: specializes · Bundles the Python toolchain stack.
- Languages → TS pack: specializes · Bundles TypeScript and JavaScript tooling.
- Languages → Java pack: specializes · Bundles Java and JVM tooling.
- Languages → YAML pack: specializes · Bundles YAML tooling and schema support.
- Languages → SQL pack: specializes · Bundles SQL tooling and database integration.
- Plugins init → LSP core: enables · Adds core LSP behavior and server wiring.
- Plugins init → Diag/Fmt/Lint: enables · Centralizes diagnostics, formatting, and linting.
- Plugins init → DAP core: enables · Adds debugging infrastructure.
- Plugins init → Runner core: enables · Provides task and command execution flows.
- Runner core → Task templates: extends · Uses Overseer templates for language-specific tasks.
- LSP core → LSP overrides: overrides · Late server tuning and per-LSP customizations.
- Plugins init → Tree-sitter queries: extends · Customizes parsing and highlighting beyond defaults.
- Plugins init → Ft plugins: applies · Loads filetype-specific editor behavior.
- Plugins init → Assets: uses · Consumes snippets, spelling, and prompt assets.
- Plugins init → Core opts: depends on · Plugin behavior builds on the base editor state.
- Plugins init → Package boot: depends on · Plugin setup relies on core bootstrap and toggles.
