Commit Graph

4 Commits

Author SHA1 Message Date
Ahmed Elrefaey
1982798b5d Fetch full documentation in code completion (#2207)
When resolving documentation for code completion items, we fetch full
documentation through the newly added
`swiftide_completion_item_get_doc_full_copy` SourceKitD function, if not
found we fallback to brief documentation as before using
`swiftide_completion_item_get_doc_brief`.

> [!NOTE]
> Unlike brief documentation, SourceKitD doesn't cache full
documentation for completion results to avoid bloating memory with a lot
of large strings.
>
> As of now, SourceKit-LSP doesn't cache completion item documentation
either, should we introduce a new full documentation cache (e.g. using
`LRUCache`)?
2025-09-04 19:42:37 +01:00
Alex Hoppen
b5186a0b43 Typedef enums in CodeCompletionSwiftInterop.h
This means we can omit the `enum` prefix when using these types in the header.
2025-01-16 11:26:03 -08:00
Alex Hoppen
16f897aefa Make the SourceKit plugins work on Windows 2025-01-11 06:57:03 +01:00
Alex Hoppen
5709e1a864 Add a SourceKit plugin to handle code completion requests
This adds a sourcekitd plugin that drives the code completion requests. It also includes a `CompletionScoring` module that’s used to rank code completion results based on their contextual match, allowing us to show more relevant code completion results at the top.
2025-01-03 14:21:54 +01:00