docs: update activeContext and progress documentation for clarity and completeness
This commit is contained in:
parent
b8fb6c42f6
commit
6d71adbc45
5 changed files with 398 additions and 251 deletions
|
|
@ -1,102 +1,122 @@
|
|||
# System Patterns
|
||||
|
||||
## System Architecture
|
||||
1. Configuration Layer Design
|
||||
- Core configuration (init.lua)
|
||||
- Module-based organization
|
||||
- Plugin management system
|
||||
- User customization layer
|
||||
|
||||
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
|
||||
|
||||
2. LSP Implementation
|
||||
- Native LSP client usage
|
||||
- Mason.nvim for LSP server management
|
||||
- Language-specific configurations
|
||||
- Diagnostic system integration
|
||||
|
||||
3. Performance Optimization
|
||||
- Modular loading system
|
||||
- Cache implementation
|
||||
- Startup optimization
|
||||
- Memory management
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
### 1. Plugin System
|
||||
- Uses `lazy.nvim` for plugin management.
|
||||
- Plugins are defined in `init.lua`.
|
||||
- Supports lazy loading via events/commands.
|
||||
- Custom plugins can be added in `lua/custom/plugins/`.
|
||||
2. Plugin Setup Pattern
|
||||
```lua
|
||||
-- Plugin configuration pattern
|
||||
{
|
||||
"plugin/name",
|
||||
event = "Event",
|
||||
dependencies = {},
|
||||
config = function()
|
||||
require("plugin").setup({})
|
||||
end
|
||||
}
|
||||
```
|
||||
|
||||
### 2. Configuration Structure
|
||||
```
|
||||
.
|
||||
├── init.lua # Main configuration file
|
||||
├── lua/
|
||||
│ ├── kickstart/ # Core functionality
|
||||
│ │ └── plugins/ # Built-in plugin configs
|
||||
│ └── custom/ # User customizations
|
||||
│ └── plugins/ # Custom plugin configs
|
||||
└── doc/ # Documentation
|
||||
```
|
||||
3. LSP Configuration Pattern
|
||||
```lua
|
||||
-- LSP server setup pattern
|
||||
lspconfig[server].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {}
|
||||
})
|
||||
```
|
||||
|
||||
### 3. Key Design Patterns
|
||||
## Implementation Guidelines
|
||||
1. Code Organization
|
||||
- One feature per file
|
||||
- Clear module interfaces
|
||||
- Consistent naming conventions
|
||||
- Documentation standards
|
||||
|
||||
#### Modular Configuration
|
||||
- Core settings in `init.lua`.
|
||||
- Plugin-specific configurations in separate files.
|
||||
- Custom configurations isolated in `lua/custom/`.
|
||||
2. Configuration Standards
|
||||
- User-facing options
|
||||
- Default values
|
||||
- Type checking
|
||||
- Validation
|
||||
|
||||
#### Event-Driven Architecture
|
||||
- Uses Neovim's event system for plugin loading.
|
||||
- Autocommands for specific behaviors.
|
||||
- LSP events for IDE features.
|
||||
3. Error Handling
|
||||
- Graceful degradation
|
||||
- User feedback
|
||||
- Debug logging
|
||||
- Recovery mechanisms
|
||||
|
||||
#### Layer-Based Organization
|
||||
1. **Core Settings Layer**
|
||||
- Basic Vim options.
|
||||
- Key mappings.
|
||||
- Global variables.
|
||||
## System Components
|
||||
1. Core Components
|
||||
- Plugin manager
|
||||
- LSP client
|
||||
- Completion engine
|
||||
- File explorer
|
||||
|
||||
2. **Plugin Layer**
|
||||
- Plugin management.
|
||||
- Plugin configurations.
|
||||
- Plugin-specific settings.
|
||||
2. Language Support
|
||||
- LSP servers
|
||||
- Treesitter parsers
|
||||
- Language tools
|
||||
- Formatters
|
||||
|
||||
3. **LSP Layer**
|
||||
- Language server configurations.
|
||||
- Completion setup.
|
||||
- Diagnostic settings.
|
||||
3. UI Components
|
||||
- Status line
|
||||
- Buffer line
|
||||
- Command line
|
||||
- Notifications
|
||||
|
||||
4. **UI Layer**
|
||||
- Colorscheme.
|
||||
- Statusline.
|
||||
- Visual enhancements.
|
||||
|
||||
## Technical Decisions
|
||||
|
||||
### 1. Configuration Language
|
||||
- Lua chosen over VimScript for:
|
||||
- Better performance.
|
||||
- Modern syntax.
|
||||
- Rich data structures.
|
||||
- Better integration with Neovim.
|
||||
|
||||
### 2. Plugin Selection
|
||||
- Minimal but powerful set of defaults.
|
||||
- Focus on maintained, actively developed plugins.
|
||||
- Preference for Lua-based plugins.
|
||||
- Built-in LSP over CoC or similar alternatives.
|
||||
|
||||
### 3. Code Organization
|
||||
- Single `init.lua` for easy understanding.
|
||||
- Modular structure available through `kickstart-modular.nvim`.
|
||||
- Clear separation between core and user customizations.
|
||||
|
||||
### 4. Performance Considerations
|
||||
- Lazy loading of plugins.
|
||||
- Efficient event handling.
|
||||
- Minimal startup impact.
|
||||
- Careful LSP configuration.
|
||||
|
||||
## Key Technical Standards
|
||||
|
||||
1. **Code Style**
|
||||
- Consistent Lua formatting.
|
||||
- Clear commenting.
|
||||
- Documented configuration options.
|
||||
|
||||
2. **Plugin Management**
|
||||
- Versioned dependencies.
|
||||
- Conditional loading.
|
||||
- Clear plugin specifications.
|
||||
|
||||
3. **Error Handling**
|
||||
- Protected calls for plugin loading.
|
||||
- Fallbacks for missing dependencies.
|
||||
- Clear error messages.
|
||||
|
||||
4. **Documentation**
|
||||
- Inline documentation.
|
||||
- Help files.
|
||||
- Clear user instructions.
|
||||
4. Integration Layer
|
||||
- Git integration
|
||||
- Terminal
|
||||
- Debug adapter
|
||||
- External tools
|
||||
Loading…
Add table
Add a link
Reference in a new issue