14 Commits

Author SHA1 Message Date
Adam Ward
308375a135 Move syntactic index back to Workspace 2025-12-08 15:16:36 -05:00
Adam Ward
9602433d2a Add new workspace/playgrounds request 2025-12-08 15:16:36 -05:00
Owen Voorhees
f04b971726 Adopt swift-tools-protocols 2025-10-31 14:11:11 -07:00
Alex Hoppen
36ccc68784 Merge pull request #2275 from ahoppen/fix-warnings
Fix build warnings
2025-09-01 22:59:07 +02:00
Alex Hoppen
87a945d692 Fix build warnings 2025-09-01 17:26:44 +02:00
Alex Hoppen
ef665080c9 Explicitly implement syntacticTestItems in DocumentationLanguageService
`SyntacticTestIndex` queries all language services for a document for its syntactic test items. This caused `syntacticDocumentTests not implemented in DocumentationLanguageService` to be logged for every Swift file in the project. Remove the default implementation of `syntacticDocumentTests` in `LanguageService` and instead provide an implementation that returns an empty array in `DocumentationLanguageService`.

While at it, also log the files for which unimplemented methods are called on `LanguageService`. This makes it easier to dermine why they are called.
2025-09-01 16:52:31 +02:00
Alex Hoppen
4040a5e4ac Add default implementations to LanguageService for methods that are not expected to be implemented by all language services
With the introduction of secondary language services, we don’t expect every language service to implement every request anymore. To simplify the addition of language services like `DocumentationLanguageService` add default implementations for methods that satisfy the following criteria:
 - `SourceKitLSPServer` does not expect side effects to happen when they are called
 - The method can throw or there is a reasonable default value
 - It is reasonable to expect that not all language services need to implement it
2025-08-26 16:10:36 +02:00
Alex Hoppen
49e1c3839c Merge DocumentationLanguageService and DocCDocumentation 2025-08-25 07:07:55 +02:00
Alex Hoppen
64fe439f24 Make DocumentationLanguageService the only module that imports DocCDocumentation 2025-08-21 10:10:54 +02:00
Alex Hoppen
1ca9780cd7 Merge pull request #2248 from ahoppen/lang-service-init-not-failable
Make `LanguageService` initializer non-failable
2025-08-20 06:51:27 +02:00
Alex Hoppen
08faa197af Make LanguageService initializer non-failable 2025-08-20 00:21:45 +02:00
Alex Hoppen
22fae21153 Handle documentation requests for Swift files in DocumentationLanguageService
This cleanly separates the responsibilities for handling documentation from those of handling Swift files. It also simplifies providing docc support for clang because we just need to implement the two `symbolGraph` methods in `ClangLanguageService` and can re-use the remaining infrastructure from `DoccLanguageService`.
2025-08-20 00:20:27 +02:00
Alex Hoppen
0e75e951d3 Allow multiple language services to handle a single document
This allows us to implement all of `doccDocumentation` in `DocumentationLanguageService`. `DocumentationLanguageService` will be a secondary language service for Swift files and can also provide the docc documentation support that’s currently in `SwiftLangaugeService`.
2025-08-18 07:52:19 +02:00
Alex Hoppen
83cc023b25 Move DocumentationLanguageService to a separate module 2025-08-15 11:48:27 +02:00