# baxthus/astronvim_config architecture

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

- Interactive diagram: https://gitdiagram.com/baxthus/astronvim_config
- Repository: https://github.com/baxthus/astronvim_config

## Overview

##### Project Type Analysis
This is a configuration extension project for AstroNvim, which is itself a Neovim distribution. The architecture should focus on showing how the different configuration components interact with both AstroNvim core and Neovim itself.

##### Main Components

A. Core Layer:
- Neovim Base
- AstroNvim Core
- User Configuration (this project)

B. Configuration Categories:
- Core Settings (init.lua, options.lua)
- Key Mappings (mappings.lua)
- Plugin Management
- Theme/Highlighting System

C. Plugin Ecosystem:
- Community Plugins
- Core Plugins
- Development Tools (mason, null-ls)
- Productivity Tools (copilot, wakatime)

**┌─────────────────────────────────────────┐**
- Neovim Core                │
- ┘
- ↑
**┌─────────────────────────────────────────┐**
- AstroNvim Core               │
- ┘
- ↑
**┌─────────────────────────────────────────┐**
- User Configuration              │
- ┬─────────────┬────────────┤
- Core       │   Plugins   │ Highlights  │
- Settings   │   System    │            │
- ┴─────────────┴────────────┘

##### Detailed Component Breakdown

a. Create a Plugin Management Section:
**┌─────── Plugin System ──────┐**
- ┌─────────┐   ┌─────────┐ │
- Community│   │  Core   │ │
- ┘   └─────────┘ │
- ┌─────────┐   ┌─────────┐ │
- Mason   │   │Null-ls  │ │
- ┘   └─────────┘ │
- ┘

b. Configuration Flow:
- Init.lua as the entry point
- Options.lua for editor settings
- Mappings.lua for key bindings
- Highlights for theme configuration

##### Implementation Notes
- Maintain consistent spacing and alignment
- Version information for major components
- Document any critical dependencies or requirements

##### Final Recommendations
- Document configuration load order
- Notes about user customization points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Base
        NV[Neovim Core]:::core
        AN[AstroNvim Core]:::astronvim
    end

    subgraph "User Configuration"
        Init[Entry Point]:::config
        click Init "https://github.com/baxthus/astronvim_config/blob/main/init.lua"
        
        subgraph "Core Settings"
            Options[Options]:::config
            click Options "https://github.com/baxthus/astronvim_config/blob/main/options.lua"
            Mappings[Key Mappings]:::config
            click Mappings "https://github.com/baxthus/astronvim_config/blob/main/mappings.lua"
        end

        subgraph "Plugin System"
            direction TB
            PluginCore[Core Plugins]:::plugin
            click PluginCore "https://github.com/baxthus/astronvim_config/blob/main/plugins/core.lua"
            PluginCommunity[Community Plugins]:::plugin
            click PluginCommunity "https://github.com/baxthus/astronvim_config/blob/main/plugins/community.lua"
            PluginUser[User Plugins]:::plugin
            click PluginUser "https://github.com/baxthus/astronvim_config/blob/main/plugins/user.lua"
        end

        subgraph "Development Tools"
            Mason[Mason]:::devtool
            click Mason "https://github.com/baxthus/astronvim_config/blob/main/plugins/mason.lua"
            NullLS[Null-LS]:::devtool
            click NullLS "https://github.com/baxthus/astronvim_config/blob/main/plugins/null-ls.lua"
            Treesitter[Treesitter]:::devtool
            click Treesitter "https://github.com/baxthus/astronvim_config/blob/main/plugins/treesitter.lua"
        end

        subgraph "Productivity Tools"
            Copilot[Copilot]:::prodtool
            click Copilot "https://github.com/baxthus/astronvim_config/blob/main/plugins/copilot.lua"
            WakaTime[WakaTime]:::prodtool
            click WakaTime "https://github.com/baxthus/astronvim_config/blob/main/plugins/wakatime.lua"
        end

        subgraph "Theme System"
            Highlights[Main Highlights]:::theme
            click Highlights "https://github.com/baxthus/astronvim_config/blob/main/highlights/init.lua"
            Duskfox[Duskfox Theme]:::theme
            click Duskfox "https://github.com/baxthus/astronvim_config/blob/main/highlights/duskfox.lua"
        end

        subgraph "Code Quality"
            LuaCheck[Lua Linting]:::quality
            click LuaCheck "https://github.com/baxthus/astronvim_config/blob/main/.luacheckrc"
            NeoConf[Neovim Config]:::quality
            click NeoConf "https://github.com/baxthus/astronvim_config/blob/main/.neoconf.json"
            StyLua[Lua Formatting]:::quality
            click StyLua "https://github.com/baxthus/astronvim_config/blob/main/.stylua.toml"
        end
    end

    %% Relationships
    NV --> AN
    AN --> Init
    Init --> Options
    Init --> Mappings
    Init --> PluginCore
    Init --> Highlights
    
    PluginCore --> Mason
    PluginCore --> NullLS
    PluginCore --> Treesitter
    
    PluginUser --> Copilot
    PluginUser --> WakaTime
    
    Highlights --> Duskfox

    %% Styling
    classDef core fill:#2b4182,stroke:#fff,stroke-width:2px,color:#fff
    classDef astronvim fill:#28a745,stroke:#fff,stroke-width:2px,color:#fff
    classDef config fill:#f96d00,stroke:#fff,stroke-width:2px,color:#fff
    classDef plugin fill:#8957e5,stroke:#fff,stroke-width:2px,color:#fff
    classDef devtool fill:#0366d6,stroke:#fff,stroke-width:2px,color:#fff
    classDef prodtool fill:#d73a49,stroke:#fff,stroke-width:2px,color:#fff
    classDef theme fill:#6f42c1,stroke:#fff,stroke-width:2px,color:#fff
    classDef quality fill:#40a9f3,stroke:#fff,stroke-width:2px,color:#fff
```
