Commit Graph

6 Commits

Author SHA1 Message Date
Ben Langmuir
439428e65d [completion] Add doc comment for CodeCompletionSession
Conflicts:
	Sources/SourceKit/sourcekitd/CodeCompletion.swift
	Sources/SourceKit/sourcekitd/CodeCompletionSession.swift
2020-10-16 13:16:26 -07:00
Ben Langmuir
8c1ef3290c [gardening] Rename CodeCompletionOptions -> SKCompletionOptions
Since it is being used in the LSP protocol layer, give it a name that
clarifies that it is SourceKit-specific.
2020-10-16 13:11:55 -07:00
Ben Langmuir
b97dac9b6f [completion] Add an extension to pass completion options per-request
Conflicts:
	Sources/LanguageServerProtocol/SupportTypes/CodeCompletionOptions.swift
	Sources/SourceKit/CodeCompletionOptions.swift
	Sources/SourceKitLSP/CodeCompletionOptions.swift
2020-10-16 13:09:06 -07:00
Ben Langmuir
9d5f54715c [completion] Fix tests when using server-side filtering
With this change, tests pass whether we default to server-side or
client-side filtering. Also duplicate a few interesting tests to run
both ways. A future commit will beef up the test coverage for
server-side filtering specifically.

Conflicts:
	Sources/SourceKit/sourcekitd/SwiftLanguageServer.swift
2020-10-16 12:02:43 -07:00
Ben Langmuir
ffd9690884 [completion] Add initial server-side filtering implementation
Work in progress: add a basic implementation for keeping track of the
current completion session, and use the sourcekitd
complete.open/update/close requests.

Conflicts:
	Sources/SourceKit/sourcekitd/CodeCompletion.swift
	Sources/SourceKit/sourcekitd/SwiftLanguageServer.swift
2020-10-16 11:53:42 -07:00
Ben Langmuir
e0511b9904 [gardening] Split code-completion into its own file
Similar to cursor info, there is enough code here it makes sense to
separate it out.

Conflicts:
	Sources/SourceKit/sourcekitd/CodeCompletion.swift
	Sources/SourceKit/sourcekitd/SwiftLanguageServer.swift
2020-10-16 11:15:56 -07:00