Commit Graph

16 Commits

Author SHA1 Message Date
Alex Hoppen 92aa94fa43 Remove the split between SourceKitD and DynamicallyLoadedSourceKitD
There is only one real class that implements the `SourceKitD` protocol, so there really isn’t any need for the protocol + class split at all. Unify them to make code simpler to reason about.
2025-03-27 11:05:24 -07:00
Alex Hoppen 1cfa8db1d8 Require Swift 6 to build SourceKit-LSP
This significantly cleans up our `import` statements
2025-03-07 08:05:49 -08:00
Alex Hoppen 12b38fe1ea Add logging for requests handled by the SourceKit plugin 2025-03-03 12:17:19 -08:00
Alex Hoppen 45be280989 Make SKDRequestDictionaryReader conform to CustomStringConvertible 2025-03-03 12:16:49 -08:00
Alex Hoppen 5efdd19a3b Remove superfluous semicolons 2025-02-25 15:01:29 -08:00
Alex Hoppen 2e21be85a6 Use the SourceKit plugin for the code completion request
This allows us to sort code completion items by their semantic score.

rdar://142909859
2025-01-25 08:57:55 -08:00
Alex Hoppen c67c06e7b1 Merge pull request #1950 from ahoppen/gardening
Gardening
2025-01-24 22:33:51 -08:00
Alex Hoppen 64f2aef446 Fix build warnings
Quite a few of these were reminders to clean things up once we no longer need to support testing using compilers and sourcekitd from older toolchains.
2025-01-23 21:11:08 -08:00
Alex Hoppen 15b9670888 Split build systems for JSON compilation database and fixed compilation database
I feel like the implementations are actually simpler if we split them. This will also allow us to add more advanced logic to the JSON compilation database build system in the future, such as inferring the toolchain from the compile command.
2025-01-17 14:38:37 -08:00
Alex Hoppen 99019bbef2 Fix test failures when running SourceKit-LSP tests with an Xcode toolchain
We need to jump through a few extra hoops when the SourceKit plugin is located in SourceKit-LSP’s build folder and we are using `sourcekitd_plugin_initialize` instead of `sourcekitd_plugin_initialize_2`.
2025-01-16 12:44:22 -08:00
Alex Hoppen 16f897aefa Make the SourceKit plugins work on Windows 2025-01-11 06:57:03 +01:00
Alex Hoppen e5f1bbfc03 Set plugin paths in all tests
Otherwise, we were trying to load sourcekitd without the plugins for the normal SourceKIt-LSP tests and with the plugins for the plugin tests.
2025-01-09 14:09:01 +01:00
Alex Hoppen 1d32512ed0 Fix issue that caused code completion request to not be cancellable 2025-01-09 14:09:01 +01:00
Alex Hoppen 1c3e5bb724 Communicate the path of sourcekitd that the plugin was loaded from to the plugin 2025-01-09 14:09:01 +01:00
Alex Hoppen 519408b1e2 Import Linux C standard libaries in SKDResponse.swift 2025-01-07 17:20:59 +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