# kabinspace/astronvim_user architecture

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

- Interactive diagram: https://gitdiagram.com/kabinspace/astronvim_user
- Repository: https://github.com/kabinspace/astronvim_user

## Overview

##### Project type and purpose
- This repository is not a web app or microservice suite but a Neovim “distribution” (user configuration) built on top of AstroNvim. Its purpose is to provide a fully featured, pre‑configured Neovim setup, orchestrating plugin installation, theming, LSP and tooling.

##### File structure
- Top‑level
- init.lua – entrypoint that sets up runtimepath and hands off to AstroNvim’s loader
- neovim.yml – CI/test configuration for linting or formatting in GitHub Actions
- .github/assets – screenshots and other documentation assets
- .gitignore, stylua.toml, selene.toml – tooling configs
- lua/
- lazy_setup.lua – orchestrates the Lazy.nvim plugin manager bootstrap and settings
- community.lua – custom community contributions or overrides to AstroNvim core
- plugins/ – individual plugin configuration modules (astrocore, astrolsp, astrotheme, etc.)
– Each .lua file here registers or configures a single plugin or plugin family
- README.md – describes installation and requirements

##### README for additional insights
- Confirms this is a drop‑in Neovim config, requires Neovim 0.9+ and a Nerd Font.

##### Elements
- Clear labels: e.g., “Neovim Core,” “AstroNvim Loader,” “Lazy.nvim,” “Plugin: astrolsp”
→ from Neovim Core to init.lua
→ init.lua to AstroNvim Loader
→ Loader to lazy_setup → plugin modules
→ plugin modules to external services (LSP, formatters)
- Blue rectangles for code modules (init.lua, lazy_setup, plugin files)
- Orange hexagon for the plugin manager (Lazy.nvim)
- Gray cloud or parallelogram for CI (neovim.yml)

##### Capturing essential details
- Plugin directory as a compound block with sub‑components for each major plugin family (astrocore, astrolsp, astrotheme, etc.)
- Community.lua as an overlay or side branch modifying the framework layer

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Core and Bootstrap
    NeovimCore["Neovim Core"]:::code
    init["init.lua"]:::code
    Loader["AstroNvim Loader"]:::code

    NeovimCore --> init
    init --> Loader

    %% Configuration Layer
    subgraph "User Configuration Layer"
        lazy["lazy_setup.lua"]:::code
        community["community.lua"]:::code
    end

    Loader --> lazy
    Loader --> community

    %% Plugin Manager
    LazyManager["Lazy.nvim (Plugin Manager)"]:::pluginmgr

    lazy --> LazyManager

    %% Plugin Modules Directory
    pluginsDir["Plugin Modules (lua/plugins/)"]:::code
    LazyManager --> pluginsDir

    subgraph "lua/plugins"
        astrocore["astrocore.lua"]:::code
        astrolsp["astrolsp.lua"]:::code
        mason["mason.lua"]:::code
        astrotheme["astrotheme.lua"]:::code
        astroui["astroui.lua"]:::code
        miniicons["mini-icons.lua"]:::code
        treesitter["treesitter.lua"]:::code
        rainbow["rainbow-delimiters.lua"]:::code
        whichkey["which-key.lua"]:::code
        todocomments["todo-comments.lua"]:::code
        conform["conform.lua"]:::code
        toggleterm["toggleterm.lua"]:::code
        blink["blink.lua"]:::code
        snacks["snacks.lua"]:::code
        neotree["neo-tree.lua"]:::code
        ufo["nvim-ufo.lua"]:::code
        disabled["disabled.lua"]:::code
    end

    pluginsDir --> astrocore
    pluginsDir --> astrolsp
    pluginsDir --> mason
    pluginsDir --> astrotheme
    pluginsDir --> astroui
    pluginsDir --> miniicons
    pluginsDir --> treesitter
    pluginsDir --> rainbow
    pluginsDir --> whichkey
    pluginsDir --> todocomments
    pluginsDir --> conform
    pluginsDir --> toggleterm
    pluginsDir --> blink
    pluginsDir --> snacks
    pluginsDir --> neotree
    pluginsDir --> ufo
    pluginsDir --> disabled

    %% External Services
    subgraph "External Services"
        LSP["LSP Servers (mason.nvim)"]:::ext
        Formatters["Formatters/Linters (conform)"]:::ext
        Terminal["Terminal (toggleterm)"]:::ext
    end

    astrolsp --> LSP
    mason --> LSP
    conform --> Formatters
    toggleterm --> Terminal

    %% CI/Validation Pipeline
    CI["CI/Validation Pipeline"]:::ci
    CI -->|"uses neovim.yml"| styluaCfg[".stylua.toml"]:::ci
    CI -->|"uses selene.toml"| seleneCfg["selene.toml"]:::ci

    %% Click Events
    click init "https://github.com/kabinspace/astronvim_user/blob/master/init.lua"
    click lazy "https://github.com/kabinspace/astronvim_user/blob/master/lua/lazy_setup.lua"
    click community "https://github.com/kabinspace/astronvim_user/blob/master/lua/community.lua"
    click pluginsDir "https://github.com/kabinspace/astronvim_user/tree/master/lua/plugins/"
    click astrocore "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/astrocore.lua"
    click astrolsp "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/astrolsp.lua"
    click mason "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/mason.lua"
    click astrotheme "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/astrotheme.lua"
    click astroui "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/astroui.lua"
    click miniicons "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/mini-icons.lua"
    click treesitter "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/treesitter.lua"
    click rainbow "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/rainbow-delimiters.lua"
    click whichkey "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/which-key.lua"
    click todocomments "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/todo-comments.lua"
    click conform "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/conform.lua"
    click toggleterm "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/toggleterm.lua"
    click blink "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/blink.lua"
    click snacks "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/snacks.lua"
    click neotree "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/neo-tree.lua"
    click ufo "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/nvim-ufo.lua"
    click disabled "https://github.com/kabinspace/astronvim_user/blob/master/lua/plugins/disabled.lua"
    click styluaCfg "https://github.com/kabinspace/astronvim_user/blob/master/.stylua.toml"
    click seleneCfg "https://github.com/kabinspace/astronvim_user/blob/master/selene.toml"

    %% Styles
    classDef code fill:#cce5ff,stroke:#4d94ff;
    classDef pluginmgr fill:#ffe5b4,stroke:#ff8c00;
    classDef ext fill:#d4edda,stroke:#28a745;
    classDef ci fill:#e2e3e5,stroke:#6c757d;
```
