Kmpl: include LSP diagnostics in context

This commit is contained in:
Levi Neely 2026-05-11 17:01:41 +02:00
parent 6fb91e79b3
commit f798e571cf
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,7 @@ trap 'rm -rf "$tmpdir"' EXIT
python3 $OLLIE/t/lsp_completion "$filename" "$line" "$col" > "$tmpdir/completions" 2>/dev/null &
python3 $OLLIE/t/lsp_symbols "$filename" > "$tmpdir/symbols" 2>/dev/null &
python3 $OLLIE/t/lsp_hover "$filename" "$line" "$col" > "$tmpdir/hover" 2>/dev/null &
python3 $OLLIE/t/lsp_diagnostics "$filename" > "$tmpdir/diagnostics" 2>/dev/null &
wait
# Walk up to workspace root (parent of .git)
@ -92,6 +93,10 @@ $(cat "$tmpdir/symbols")
$(cat "$tmpdir/hover")
</hover>
"
[ -s "$tmpdir/diagnostics" ] && context="${context}<diagnostics>
$(cat "$tmpdir/diagnostics")
</diagnostics>
"
[ -s "$tmpdir/hover_embedded" ] && context="${context}<types>
$(cat "$tmpdir/hover_embedded")
</types>