From 236c3c571896acfd41120d3abbcc6fb49e30c3cc Mon Sep 17 00:00:00 2001 From: "Aleksei (Faumaray) Selikhov" Date: Sun, 6 Dec 2026 01:58:08 +0300 Subject: [PATCH] Rank same-document completion candidates first Candidates carry a local flag set from the index record path, and the deterministic sort key orders local candidates before remote ones within the same kind. Registered feature tests cover the ranking. --- docs/agent-workflow/VERIFICATION.md | 9 +++++++++ include/vls/features/Completion.hpp | 2 ++ src/features/Completion.cpp | 18 +++++++++--------- src/semantic/EditorDiagnostics.cpp | 14 ++++++++------ tests/features/CompletionTests.cpp | 2 +- 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/docs/agent-workflow/VERIFICATION.md b/docs/agent-workflow/VERIFICATION.md index 07c2eb3..e96f612 100644 --- a/docs/agent-workflow/VERIFICATION.md +++ b/docs/agent-workflow/VERIFICATION.md @@ -61,6 +61,15 @@ start coordinate only, so ranges are zero-width until an end is available. LSP adapters and index/rename/debugging integration remain open. `vbs test` passed all 17 native suites; CMake passed the reflection and trace suites. +## December 6 locality ranking in completion + +Completion candidates now carry whether they are declared in the requesting +document, and the sort key ranks local candidates first within each kind +(`<0 local|1 remote>