Commit Graph

4 Commits

Author SHA1 Message Date
Alex Hoppen
53407f59af Mark asynchronous blocks in Csourcekitd as Sendable
We don’t have any guarantees which thread these blocks will be called on by sourcekitd, so we shouldn’t make any assumptions about it in Swift. We should thus mark them as Sendable.
2025-03-27 11:06:49 -07: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
Alex Hoppen
f5fb23ad4c Rename sourcekitd_ to sourcekitd_api_ and add nullability annotations to sourcekit_functions.h
Naming types in sourcekitd_functions.h `sourcekit_api_` instead of `sourcekitd_` indicates that these are types to be used with dynamically loaded sourcekitd libraries. It avoids confusion if sourcekitd is also linked, which adds the `sourcekitd_` symbols.

Adding nullability annotations to it is also just nice.

And some improved formatting never hurts.
2024-02-23 09:13:42 -08:00
Ben Langmuir
aabf57a252 Import SourceKit-LSP sources 2018-11-13 15:50:48 -08:00