Add return-type inlay hints after calls

The bounded inlay-hint core now matches a call's closing parenthesis
(nested calls, literals and comments aware) and places a type hint
labelled with the compiler's canonical type. EditorDiagnostics emits
it for every occurrence independently of parameter signatures.
Registered tests cover nested matching, placement, skipped cases and
bounds; a real stdio session showed both the parameter and return hints
at the fnv1a64 call.
This commit is contained in:
faumaray committed 2026-12-05 18:08:04 +03:00
1 parent 0bf5873069
commit 2cced8363d
6 files changed
+135 -7

No files matched your search

+2 -2
View File
@@ -20,7 +20,7 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
| textDocument/selectionRange, foldingRange | `vls_feature_tests`, real stdio session |
| textDocument/codeAction (quickfix) | `vls_feature_tests` + `vls_diagnostic_tests`, real stdio session |
| textDocument/semanticTokens/full | `vls_feature_tests`, real stdio session |
| textDocument/inlayHint (parameter types) | `vls_feature_tests`, real stdio session |
| textDocument/inlayHint (parameter and return types) | `vls_feature_tests`, real stdio session |
| textDocument/codeLens + workspace/executeCommand (`vls.showReferences`) | `vls_feature_tests`, real stdio session |
| workspace/symbol | stock occurrence corpus |
| workspace fileOperations (didCreate/didRename/didDelete) | `vls_feature_tests`, real stdio session |
@@ -40,7 +40,7 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
| Applying multi-file renames through client buffers | plans can be ready; application is client work |
| `EditorDiagnostics` reflection LSP wiring | the server has no reflection data source |
| semantic token modifiers / richer token types | legend is one type (`function`) from occurrences |
| inlay hints beyond parameter types | return-type and deduced-type hints need more compiler data |
| textDocument/formatting | no formatter is available; needs a dependency decision |
## Next slices
+16
View File
@@ -79,6 +79,22 @@ the upgraded snapshot (keeping `snapshot.prev.json`) and rewrites a legacy
about 25-30s in a Debug build (it passed VBS at ~27s); the full CMake run then
passed 18/18.
## December 5 return-type inlay hints
`include/vls/features/InlayHints.hpp` gained `call_end` (the offset past the
matching ')' of a call, nested calls/literals/comments aware) and
`return_type_hint`: a type hint after the call's closing parenthesis labelled
with the compiler's canonical type. `EditorDiagnostics::inlay_hints` emits it for
every occurrence independently of whether a parameter signature exists.
Real stdio session with the stock observer at `fnv1a64(text)`:
```
inlayHint: 2 first: [({'character': 41, 'line': 18}, 'std::string_view:', 2),
({'character': 46, 'line': 18}, ': long unsigned int', 1)]
```
Registered `vls_feature_tests` grew to 88 cases. All 18 native suites and all
18 CMake tests passed.
## December 5 code lenses and the reference command
`include/vls/features/CodeLens.hpp` builds one bounded lens per unique