red_knot_server: add auto-completion MVP

This PR does the wiring necessary to respond to completion requests from
LSP clients.

As far as the actual completion results go, they are nearly about the
dumbest and simplest thing we can do: we simply return a de-duplicated
list of all identifiers from the current module.
This commit is contained in:
Andrew Gallant 2025-04-30 14:06:18 -04:00 committed by Andrew Gallant
parent 163d526407
commit b7ce694162
7 changed files with 109 additions and 1 deletions

View file

@ -227,6 +227,9 @@ impl Server {
inlay_hint_provider: Some(lsp_types::OneOf::Right(
InlayHintServerCapabilities::Options(InlayHintOptions::default()),
)),
completion_provider: Some(lsp_types::CompletionOptions {
..Default::default()
}),
..Default::default()
}
}