How silasmarvin/lsp-ai works
Main Components
a. Core LSP Server Component:
• LSP protocol communication handlers
• Custom request handlers (visible in custom_requests directory)
b. Backend Services Layer:
• Transformer Backends (Multiple AI Model Providers):
• OpenAI
• Anthropic
• Gemini
• Llama.cpp
• Ollama
• Mistral FIM
• Memory Backends:
• File Store
• PostgresML
• Vector Store
c. Editor Integration Layer:
• Supported editors (VSCode, Neovim, Helix, etc.)
• LSP protocol communication
d. Processing Components:
• Memory Worker
• Transformer Worker
• Text Splitters (including Tree-sitter integration)
Relationship Flows to Illustrate
a. Primary Data Flow:
Results returning to Editor
b. Secondary Flows:
• Memory management operations
• Embedding processing
• Text splitting and processing
Component Details
LSP Server Core (Central):
┌─────────────────────────┐
• LSP-AI Server │
• ┤
• Custom Requests │
• Memory Management │
• Transformer Workers │
• Text Splitters │
• ┘
Backend Services (Right side):
┌─────────────────┐
• AI Backends │
• ┤
• OpenAI │
• Anthropic │
• Gemini │
• Llama.cpp │
• Ollama │
• Mistral FIM │
• ┘
Memory Systems (Bottom):
┌─────────────────┐
• Memory Backends │
• ┤
• File Store │
• PostgresML │
• Vector Store │
• ┘
Additional Elements
• Version compatibility information
• Configuration flow
• Scaling indicators for components that can be scaled
• Extension points for future features
Remember to include notes about:
• Asynchronous operations
• Fallback mechanisms
• Configuration options
• Extension points for future features like semantic search
This will provide a clear understanding of how LSP-AI serves as a bridge between editors and AI services while maintaining its core mission of empowering programmers through existing tools.