feat: LSP client integration with diagnostics, definitions, and references

This commit is contained in:
Sisyphus
2026-04-01 21:34:36 +09:00
parent 821199640a
commit 12182d8b3c
12 changed files with 1287 additions and 25 deletions

View File

@@ -4,6 +4,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use crate::config::{ConfigError, ConfigLoader, RuntimeConfig};
use lsp::LspContextEnrichment;
#[derive(Debug)]
pub enum PromptBuildError {
@@ -130,6 +131,15 @@ impl SystemPromptBuilder {
self
}
#[must_use]
pub fn with_lsp_context(mut self, enrichment: &LspContextEnrichment) -> Self {
if !enrichment.is_empty() {
self.append_sections
.push(enrichment.render_prompt_section());
}
self
}
#[must_use]
pub fn build(&self) -> Vec<String> {
let mut sections = Vec::new();