feat: add initial documentation for ecommerce project and system architecture
Signed-off-by: juliano.barbosa <julianomb@gmail.com>
This commit is contained in:
parent
04b3252e24
commit
ae234c5e5b
9 changed files with 559 additions and 143 deletions
|
|
@ -1,33 +1,41 @@
|
|||
# Active Context: Neovim Configuration
|
||||
|
||||
## Current Focus
|
||||
Resolving runtime file location issues and ensuring proper module loading, specifically:
|
||||
1. vim.diagnostic module not found
|
||||
2. Missing syntax.vim file
|
||||
3. Proper runtime path configuration
|
||||
## Current Work
|
||||
- Initial Memory Bank documentation completed
|
||||
- Project structure and requirements fully documented
|
||||
- All core documentation files populated with comprehensive information
|
||||
|
||||
## Recent Changes
|
||||
None documented yet - initial setup of memory bank
|
||||
- Populated all Memory Bank documentation files:
|
||||
- productContext.md: Full Neovim IDE configuration requirements
|
||||
- systemPatterns.md: Detailed architecture and implementation patterns
|
||||
- techContext.md: Complete technical specifications and dependencies
|
||||
- progress.md: Implementation roadmap and tracking
|
||||
- Established comprehensive documentation framework
|
||||
- Defined complete system architecture and patterns
|
||||
- Specified all technical requirements and constraints
|
||||
|
||||
## Next Steps
|
||||
1. **Immediate Actions**:
|
||||
- Verify VIMRUNTIME environment variable
|
||||
- Check Neovim runtime files installation
|
||||
- Run :checkhealth to diagnose issues
|
||||
- Consider reinstalling Neovim if needed
|
||||
1. Begin Implementation Phase 1: Core Setup
|
||||
- Initialize base Neovim configuration
|
||||
- Set up lazy.nvim plugin management
|
||||
- Configure basic UI elements
|
||||
- Implement key mapping framework
|
||||
|
||||
2. **Investigation Required**:
|
||||
- Determine why vim.diagnostic module isn't found despite running Neovim v0.11.0-dev
|
||||
- Verify proper installation of runtime files
|
||||
- Check for any conflicts in configuration
|
||||
2. Prepare for Plugin Integration
|
||||
- Install required dependencies
|
||||
- Configure LSP infrastructure
|
||||
- Set up completion system
|
||||
- Implement file navigation
|
||||
|
||||
## Active Decisions
|
||||
1. Using Neovim v0.11.0-dev (development version)
|
||||
2. Following Kickstart.nvim template for configuration
|
||||
3. Implementing diagnostic functionality through vim.diagnostic
|
||||
3. Start Language Support Configuration
|
||||
- Begin with core languages (Python, Lua)
|
||||
- Configure language servers
|
||||
- Set up debugging infrastructure
|
||||
- Implement formatting tools
|
||||
|
||||
## Current Considerations
|
||||
1. Whether to switch to a stable Neovim release
|
||||
2. How to properly configure runtime paths
|
||||
3. Best approach for runtime file management
|
||||
4. Impact on plugin functionality
|
||||
4. Focus on Performance
|
||||
- Implement lazy loading
|
||||
- Optimize startup time
|
||||
- Configure caching
|
||||
- Monitor resource usage
|
||||
|
|
@ -1,30 +1,87 @@
|
|||
# Product Context: Neovim Configuration
|
||||
# Product Context: Neovim IDE Configuration
|
||||
|
||||
## Why This Project Exists
|
||||
This Neovim configuration exists to provide a robust, maintainable development environment based on the Kickstart.nvim template. It aims to deliver modern editor features while maintaining simplicity and transparency in its implementation.
|
||||
This project aims to transform Neovim into a powerful, fully-featured Integrated Development Environment (IDE) that provides modern development capabilities while maintaining Neovim's core efficiency and extensibility. It serves developers who want the speed and flexibility of Neovim combined with the comprehensive features of traditional IDEs.
|
||||
|
||||
## Problems It Solves
|
||||
1. **Module Accessibility**: Currently addressing issues with runtime file locations and module loading, specifically the vim.diagnostic module
|
||||
2. **Development Environment**: Provides a comprehensive IDE-like environment through:
|
||||
- LSP integration for code intelligence
|
||||
- Treesitter for advanced syntax highlighting
|
||||
- Fuzzy finding and file navigation
|
||||
- Git integration
|
||||
- Diagnostic capabilities
|
||||
1. Development Environment Integration
|
||||
- Fragmented development tooling
|
||||
- Inconsistent development experiences across languages
|
||||
- Complex setup requirements for different programming languages
|
||||
- Need for multiple editors/IDEs for different tasks
|
||||
- Debugging Tools
|
||||
|
||||
2. Productivity Barriers
|
||||
- Manual code completion and navigation
|
||||
- Lack of integrated debugging capabilities
|
||||
- Inefficient project management
|
||||
- Limited language support
|
||||
|
||||
3. Configuration Management
|
||||
- Complex plugin management
|
||||
- Inconsistent keybindings
|
||||
- Difficult maintenance of settings
|
||||
- Performance optimization challenges
|
||||
|
||||
## How It Should Work
|
||||
1. **Runtime Environment**:
|
||||
- All Neovim runtime files should be properly located and accessible
|
||||
- Core modules like vim.diagnostic should load without errors
|
||||
- VIMRUNTIME environment variable should point to correct location
|
||||
|
||||
2. **User Experience**:
|
||||
- Configuration should load without errors
|
||||
- All plugins should initialize properly
|
||||
- LSP features should work seamlessly
|
||||
- Diagnostic information should be visible and accurate
|
||||
### Language Support
|
||||
Comprehensive development support for:
|
||||
- Python: Full LSP support, debugging, virtual environments
|
||||
- Lua: Native integration, debugging, documentation
|
||||
- Rust: Cargo integration, LSP, formatting
|
||||
- Go: Go tools integration, testing support
|
||||
- PowerShell: Scripting support, terminal integration
|
||||
- Bash: Shell scripting, linting
|
||||
- HTML/CSS: Preview, formatting, snippets
|
||||
- PHP: Debug, testing, framework support
|
||||
|
||||
3. **Configuration Management**:
|
||||
- Settings should be clearly organized in init.lua
|
||||
- Plugin management through lazy.nvim
|
||||
- Clear separation of concerns in configuration structure
|
||||
### Core Features
|
||||
1. Intelligent Code Assistance
|
||||
- Auto-completion with context awareness
|
||||
- Real-time syntax highlighting
|
||||
- LSP integration for all supported languages
|
||||
- Inline code diagnostics and suggestions
|
||||
|
||||
2. Navigation & Management
|
||||
- Advanced file navigation and search
|
||||
- Project-wide search and replace
|
||||
- Split windows and buffer management
|
||||
- Integrated file explorer
|
||||
|
||||
3. Development Tools
|
||||
- Integrated debugging support
|
||||
- Git version control integration
|
||||
- Built-in terminal emulator
|
||||
- Code formatting and linting
|
||||
|
||||
4. Project Organization
|
||||
- Project-specific settings
|
||||
- Workspace management
|
||||
- Session persistence
|
||||
- Custom project templates
|
||||
|
||||
### Configuration Framework
|
||||
1. Modular Organization
|
||||
- Separate configuration files by function
|
||||
- Plugin-specific configurations
|
||||
- Language-specific settings
|
||||
- User customization layer
|
||||
|
||||
2. Performance Optimization
|
||||
- Lazy loading of plugins
|
||||
- Conditional feature enabling
|
||||
- Cache management
|
||||
- Startup time optimization
|
||||
|
||||
3. User Experience
|
||||
- Intuitive key mappings
|
||||
- Customizable color schemes
|
||||
- Informative status line
|
||||
- Context-aware menus
|
||||
|
||||
4. Extensibility
|
||||
- Plugin management system
|
||||
- Custom commands framework
|
||||
- User-defined autocommands
|
||||
- Extension API support
|
||||
|
|
@ -1,58 +1,122 @@
|
|||
# System Patterns: Neovim Configuration
|
||||
# System Patterns
|
||||
|
||||
## System Architecture
|
||||
1. **Core Configuration Structure**
|
||||
- init.lua as main configuration file
|
||||
- Lazy plugin management system
|
||||
- LSP integration through nvim-lspconfig
|
||||
- Custom keymaps and settings
|
||||
1. Configuration Layer Design
|
||||
- Core configuration (init.lua)
|
||||
- Module-based organization
|
||||
- Plugin management system
|
||||
- User customization layer
|
||||
|
||||
2. **Key Components**
|
||||
- Plugin Management (lazy.nvim)
|
||||
- LSP Configuration
|
||||
- Treesitter Integration
|
||||
- Diagnostic System
|
||||
- Custom Keybindings
|
||||
2. Feature Organization
|
||||
- LSP services management
|
||||
- Completion engine integration
|
||||
- File tree and navigation
|
||||
- Buffer and window management
|
||||
|
||||
3. Event System
|
||||
- Autocommands framework
|
||||
- Key mapping system
|
||||
- Plugin hooks
|
||||
- Custom events
|
||||
|
||||
## Key Technical Decisions
|
||||
1. Plugin Management
|
||||
- Use of lazy.nvim for plugin management
|
||||
- Lazy-loading strategy for performance
|
||||
- Conditional plugin loading
|
||||
- Dependencies management
|
||||
|
||||
### Plugin Management
|
||||
- Using lazy.nvim for plugin management
|
||||
- Lazy loading enabled for better startup performance
|
||||
- Plugin-specific configurations contained within setup blocks
|
||||
2. LSP Implementation
|
||||
- Native LSP client usage
|
||||
- Mason.nvim for LSP server management
|
||||
- Language-specific configurations
|
||||
- Diagnostic system integration
|
||||
|
||||
### LSP Implementation
|
||||
- Mason for LSP server management
|
||||
- nvim-lspconfig for LSP configuration
|
||||
- Custom LSP attach events and keymaps
|
||||
- Diagnostic configuration through vim.diagnostic
|
||||
3. Performance Optimization
|
||||
- Modular loading system
|
||||
- Cache implementation
|
||||
- Startup optimization
|
||||
- Memory management
|
||||
|
||||
### Editor Features
|
||||
- Treesitter for syntax highlighting
|
||||
- Telescope for fuzzy finding
|
||||
- Which-key for keymap discovery
|
||||
- Mini.nvim for various utilities
|
||||
## Architecture Patterns
|
||||
1. Module Pattern
|
||||
```lua
|
||||
-- Module structure
|
||||
local M = {}
|
||||
-- Configuration
|
||||
M.setup = function(opts)
|
||||
-- Setup logic
|
||||
end
|
||||
-- Module functions
|
||||
M.function_name = function()
|
||||
-- Implementation
|
||||
end
|
||||
return M
|
||||
```
|
||||
|
||||
## Component Relationships
|
||||
1. **Plugin Dependencies**
|
||||
- LSP plugins depend on nvim-lspconfig
|
||||
- UI elements depend on having Nerd Font
|
||||
- Telescope depends on plenary.nvim
|
||||
2. Plugin Setup Pattern
|
||||
```lua
|
||||
-- Plugin configuration pattern
|
||||
{
|
||||
"plugin/name",
|
||||
event = "Event",
|
||||
dependencies = {},
|
||||
config = function()
|
||||
require("plugin").setup({})
|
||||
end
|
||||
}
|
||||
```
|
||||
|
||||
2. **Configuration Flow**
|
||||
- Leader key set before plugins
|
||||
- Basic options configured early
|
||||
- Plugins loaded through lazy.nvim
|
||||
- LSP servers configured after plugins
|
||||
- Keymaps set after all configurations
|
||||
3. LSP Configuration Pattern
|
||||
```lua
|
||||
-- LSP server setup pattern
|
||||
lspconfig[server].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {}
|
||||
})
|
||||
```
|
||||
|
||||
## Design Patterns
|
||||
1. **Modularity**
|
||||
- Separate plugin configurations
|
||||
- Isolated LSP server settings
|
||||
- Independent keymap definitions
|
||||
## Implementation Guidelines
|
||||
1. Code Organization
|
||||
- One feature per file
|
||||
- Clear module interfaces
|
||||
- Consistent naming conventions
|
||||
- Documentation standards
|
||||
|
||||
2. **Event-Driven**
|
||||
- LSP attach events
|
||||
- Autocommands for specific behaviors
|
||||
- Lazy loading based on events
|
||||
2. Configuration Standards
|
||||
- User-facing options
|
||||
- Default values
|
||||
- Type checking
|
||||
- Validation
|
||||
|
||||
3. Error Handling
|
||||
- Graceful degradation
|
||||
- User feedback
|
||||
- Debug logging
|
||||
- Recovery mechanisms
|
||||
|
||||
## System Components
|
||||
1. Core Components
|
||||
- Plugin manager
|
||||
- LSP client
|
||||
- Completion engine
|
||||
- File explorer
|
||||
|
||||
2. Language Support
|
||||
- LSP servers
|
||||
- Treesitter parsers
|
||||
- Language tools
|
||||
- Formatters
|
||||
|
||||
3. UI Components
|
||||
- Status line
|
||||
- Buffer line
|
||||
- Command line
|
||||
- Notifications
|
||||
|
||||
4. Integration Layer
|
||||
- Git integration
|
||||
- Terminal
|
||||
- Debug adapter
|
||||
- External tools
|
||||
|
|
|
|||
|
|
@ -1,65 +1,126 @@
|
|||
# Technical Context: Neovim Configuration
|
||||
# Technical Context
|
||||
|
||||
## Technologies Used
|
||||
1. Core Technologies
|
||||
- Neovim (>= 0.9.0)
|
||||
- Lua (>= 5.1)
|
||||
- Tree-sitter
|
||||
- Built-in LSP client
|
||||
|
||||
### Core Environment
|
||||
- Neovim v0.11.0-dev-1731+gf8cbdbb4a8
|
||||
- LuaJIT 2.1.1736781742
|
||||
- Operating System: Linux 5.15
|
||||
- Shell: /bin/zsh
|
||||
2. Package Management
|
||||
- lazy.nvim (Plugin manager)
|
||||
- mason.nvim (LSP/DAP/Formatter manager)
|
||||
- mason-lspconfig.nvim (LSP configuration)
|
||||
|
||||
### Key Dependencies
|
||||
1. **Plugin Manager**
|
||||
- lazy.nvim for plugin management
|
||||
- Automatic plugin installation and loading
|
||||
|
||||
2. **Language Support**
|
||||
- nvim-lspconfig for LSP configuration
|
||||
- Treesitter for syntax highlighting
|
||||
- Mason for LSP server management
|
||||
|
||||
3. **User Interface**
|
||||
- Telescope for fuzzy finding
|
||||
- Which-key for keymap discovery
|
||||
- Tokyo Night color scheme
|
||||
- Mini.nvim for various UI components
|
||||
3. Required External Tools
|
||||
- Git (Version control)
|
||||
- Ripgrep (Search)
|
||||
- fd (File finding)
|
||||
- Node.js (LSP servers)
|
||||
|
||||
## Development Setup
|
||||
1. **Required Components**
|
||||
- Neovim 0.8+ (currently running 0.11.0-dev)
|
||||
- Git for plugin management
|
||||
- (Optional) Nerd Font for icons
|
||||
- Proper runtime files installation
|
||||
1. Prerequisites Installation
|
||||
```bash
|
||||
# Install Neovim
|
||||
# Install Node.js and npm
|
||||
# Install Python and pip
|
||||
# Install Rust and Cargo
|
||||
# Install Go
|
||||
```
|
||||
|
||||
2. **Configuration Location**
|
||||
- Main config: /home/barbosa/.config/nvim/init.lua
|
||||
- Memory Bank: /home/barbosa/.config/nvim/cline_docs/
|
||||
2. Required Global Tools
|
||||
```bash
|
||||
# LSP Servers
|
||||
npm install -g pyright typescript-language-server bash-language-server
|
||||
# Formatters
|
||||
npm install -g prettier
|
||||
cargo install stylua
|
||||
```
|
||||
|
||||
3. Plugin Dependencies
|
||||
- tree-sitter CLI
|
||||
- language parsers
|
||||
- compilation tools (make, gcc)
|
||||
|
||||
## Technical Constraints
|
||||
1. **Runtime Requirements**
|
||||
- Proper VIMRUNTIME environment variable setting
|
||||
- Access to runtime files (currently having issues)
|
||||
- vim.diagnostic module accessibility
|
||||
1. Performance Requirements
|
||||
- Startup time < 100ms
|
||||
- Memory usage < 1GB
|
||||
- Responsive editing experience
|
||||
- Efficient file search
|
||||
|
||||
2. **Plugin Dependencies**
|
||||
- Some plugins require specific Neovim versions
|
||||
- LSP servers need external installations
|
||||
- Some features depend on Nerd Font availability
|
||||
2. System Requirements
|
||||
- Modern terminal emulator
|
||||
- True color support
|
||||
- Unicode support
|
||||
- Clipboard integration
|
||||
|
||||
3. Plugin Limitations
|
||||
- Compatibility requirements
|
||||
- Load order dependencies
|
||||
- Potential conflicts
|
||||
- Resource usage
|
||||
|
||||
## Dependencies
|
||||
1. **Core Plugins**
|
||||
- lazy.nvim (plugin manager)
|
||||
- nvim-lspconfig (LSP support)
|
||||
- nvim-treesitter (syntax)
|
||||
- telescope.nvim (fuzzy finder)
|
||||
- mason.nvim (LSP server manager)
|
||||
1. Core Plugins
|
||||
- lazy.nvim (Plugin management)
|
||||
- nvim-lspconfig (LSP configuration)
|
||||
- nvim-cmp (Completion)
|
||||
- telescope.nvim (Fuzzy finding)
|
||||
- neo-tree.nvim (File explorer)
|
||||
- which-key.nvim (Key binding help)
|
||||
|
||||
2. **LSP Servers**
|
||||
- Various language servers (go, python, lua, etc.)
|
||||
- External formatters and linters
|
||||
- Diagnostic tools
|
||||
2. Language Support
|
||||
- LSP Servers
|
||||
- Treesitter parsers
|
||||
- Debug adapters
|
||||
- Formatters/Linters
|
||||
|
||||
3. **System Requirements**
|
||||
- Git for plugin management
|
||||
- Make for some plugin builds
|
||||
- Proper runtime file installation
|
||||
3. UI Enhancements
|
||||
- lualine.nvim (Status line)
|
||||
- bufferline.nvim (Buffer line)
|
||||
- nvim-notify (Notifications)
|
||||
- nvim-web-devicons (Icons)
|
||||
|
||||
## Build & Deployment
|
||||
1. Configuration Structure
|
||||
```
|
||||
~/.config/nvim/
|
||||
├── init.lua
|
||||
├── lua/
|
||||
│ ├── core/
|
||||
│ ├── plugins/
|
||||
│ ├── lsp/
|
||||
│ └── config/
|
||||
```
|
||||
|
||||
2. Installation Process
|
||||
- Configuration files setup
|
||||
- Plugin installation
|
||||
- LSP servers installation
|
||||
- Parser installation
|
||||
|
||||
3. Update Process
|
||||
- Plugin updates
|
||||
- LSP server updates
|
||||
- Configuration updates
|
||||
- Backup strategy
|
||||
|
||||
## Testing Strategy
|
||||
1. Configuration Testing
|
||||
- Startup validation
|
||||
- Plugin compatibility
|
||||
- Feature verification
|
||||
- Performance monitoring
|
||||
|
||||
2. Language Support Testing
|
||||
- LSP functionality
|
||||
- Completion accuracy
|
||||
- Diagnostic reporting
|
||||
- Format checking
|
||||
|
||||
3. Integration Testing
|
||||
- Plugin interactions
|
||||
- Key binding conflicts
|
||||
- Event handling
|
||||
- Error recovery
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue