# 2kabhishek/nvim2k architecture

> Architecture diagram of the GitHub repository 2kabhishek/nvim2k, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/2kabhishek/nvim2k
- Repository: https://github.com/2kabhishek/nvim2k

## Overview

##### Main Components Structure

a. Core Layer
- Core modules (options, functions, autocmd, keys)

b. Plugin Management Layer
- This directly above the core
- Lazy.nvim as the plugin manager
- Connection to plugins list and lock file

c. Feature Layers (Create three distinct sections):
##### Language Features (Left side)
- LSP Configuration
- Treesitter
- Debugging (DAP)
- Completion
- AI Integration (Copilot)

##### Tools (Right side)
- File Navigation (nvim-tree)
- Search (Telescope)
- Git Integration
- Database Tools
- Navigation Helpers

##### UI Components (Top)
- Theme (OneDark)
- Status Line (Lualine)
- UI Enhancements (Dressing)

##### Relationship Flows

- Plugin initialization flow from core to plugin manager
- Configuration loading sequence
- Feature dependencies
- User configuration override path

##### Technical Details

Annotations for:
- Lazy loading indicators
- LSP server connections
- External tool requirements
- Performance optimization points

##### The three distinct plugin categories (lang, tools, ui)

Keep the abstraction level focused on the architectural components while showing the plugin organization structure, as this is primarily a configuration framework rather than a traditional application.

Remember to indicate the initialization flow from init.lua through the various layers, and highlight the user configuration's ability to override any default settings.

This structure will provide a clear visualization of how nvim2k transforms a basic Neovim installation into a full-featured IDE while maintaining its modular and extensible nature.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Core Layer
    subgraph Core
        CoreOptions["Options"]:::core
        CoreKeys["Key Mappings"]:::core
        CoreAutocmd["Auto Commands"]:::core
        CoreFunctions["Core Functions"]:::core
    end

    %% Plugin Management Layer
    subgraph PluginMgmt
        LazyNvim["lazy.nvim"]:::plugin
        PluginList["Plugin List"]:::plugin
        LockFile["Lock File"]:::plugin
    end

    %% Language Features Layer
    subgraph LangFeatures
        LSPConfig["LSP Config"]:::lang
        LSPSaga["LSP Saga"]:::lang
        Treesitter["Treesitter"]:::lang
        DAP["Debugging"]:::lang
        Copilot["Copilot"]:::lang
        CopilotChat["Copilot Chat"]:::lang
        NeoTest["Testing Framework"]:::lang
    end

    %% Tools Layer
    subgraph Tools
        NvimTree["File Explorer"]:::tools
        Telescope["Fuzzy Finder"]:::tools
        TelescopeCustom["Custom Telescope"]:::tools
        GitSigns["Git Integration"]:::tools
        DBee["Database Tools"]:::tools
        WhichKey["Key Helper"]:::tools
    end

    %% UI Components Layer
    subgraph UI
        OneDark["Theme"]:::ui
        Lualine["Status Line"]:::ui
        Dressing["UI Enhancement"]:::ui
    end

    %% Utilities Layer
    subgraph Utils
        Icons["Icons"]:::utils
        UtilFuncs["Utility Functions"]:::utils
    end

    %% Relationships
    Core --> PluginMgmt
    PluginMgmt --> LangFeatures
    PluginMgmt --> Tools
    PluginMgmt --> UI
    Utils --> UI
    Utils --> Tools
    Utils --> LangFeatures

    %% Styling
    classDef core fill:#1e40af,color:#fff
    classDef plugin fill:#6b21a8,color:#fff
    classDef lang fill:#15803d,color:#fff
    classDef tools fill:#c2410c,color:#fff
    classDef ui fill:#7e22ce,color:#fff
    classDef utils fill:#525252,color:#fff

    %% Click Events
    click CoreOptions "https://github.com/2KAbhishek/nvim2k/blob/main/lua/core/options.lua"
    click CoreKeys "https://github.com/2KAbhishek/nvim2k/blob/main/lua/core/keys.lua"
    click CoreAutocmd "https://github.com/2KAbhishek/nvim2k/blob/main/lua/core/autocmd.lua"
    click CoreFunctions "https://github.com/2KAbhishek/nvim2k/blob/main/lua/core/functions.lua"
    click LazyNvim "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/lazy.lua"
    click PluginList "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/list.lua"
    click LockFile "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/lock.json"
    click LSPConfig "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/lang/lspconfig.lua"
    click LSPSaga "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/lang/lspsaga.lua"
    click Treesitter "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/lang/treesitter.lua"
    click DAP "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/lang/dap.lua"
    click Copilot "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/lang/copilot.lua"
    click CopilotChat "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/lang/copilot-chat.lua"
    click NeoTest "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/lang/neotest.lua"
    click NvimTree "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/tools/nvim-tree.lua"
    click Telescope "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/tools/telescope.lua"
    click TelescopeCustom "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/tools/telescope-custom.lua"
    click GitSigns "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/tools/gitsigns.lua"
    click DBee "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/tools/dbee.lua"
    click WhichKey "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/tools/which-key.lua"
    click OneDark "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/ui/onedark.lua"
    click Lualine "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/ui/lualine.lua"
    click Dressing "https://github.com/2KAbhishek/nvim2k/blob/main/lua/plugins/ui/dressing.lua"
    click Icons "https://github.com/2KAbhishek/nvim2k/blob/main/lua/lib/icons.lua"
    click UtilFuncs "https://github.com/2KAbhishek/nvim2k/blob/main/lua/lib/util.lua"
```
