Commit Graph

55 Commits

Author SHA1 Message Date
cukr
9f9cc9a734 Implement color presentation 2019-05-30 19:36:09 +02:00
Ben Langmuir
36e567395e Merge pull request #98 from Trzyipolkostkicukru/cukr/document-symbol
Implement document symbol request
2019-05-29 17:20:16 -07:00
cukr
f0391f6dca refactor symbolKind(sourcekitSymbolKind:) to sourcekitd_uid_t extension 2019-05-04 18:18:01 +02:00
cukr
9e1e493e74 Set syntactic_only to avoid unnecessary work, and mangle the name 2019-05-04 16:08:14 +02:00
cukr
550e3768ae Add DocumentSymbol tests and some missing symbol kinds 2019-05-04 15:48:48 +02:00
Gwen Mittertreiner
b84b38774e Get the pid of the current process using Foundation 2019-04-22 14:41:17 -07:00
cukr
eb8ea967ba Implement document symbol request 2019-04-20 22:49:47 +02:00
Gwen Mittertreiner
0868c5fc4b Fixup SourceKit module on Windows 2019-04-18 13:16:30 -07:00
Ben Langmuir
77351820ce Use AbsolutePath.pathString instead of description
Per review feedback; pathString is semantically the string we want,
while description is for creating a human-readable string.
2019-02-01 18:05:11 -08:00
Ben Langmuir
7f697fa14a [swiftpm] Update to latest master
* import Utility -> import SPMUtility
* AbsolutePath.asString -> path.description or "\(path)"
2019-02-01 16:47:04 -08:00
Ben Langmuir
76d7a2caf5 Merge pull request #65 from krzyzanowskim/cli-arguments
Command line arguments
2019-01-30 11:55:41 -08:00
David Goldman
6c93c92f4d Allow multiple Xcode toolchains in the registry
1) Toolchain ID is no longer unique; XcodeDefault toolchains may be
   registered multiple times as long as their path is different
   (e.g. different Xcode versions). At the moment no other toolchain
   may be duplicated.
2) `BuildSystem` specifies a `Toolchain` directly instead of a
   Toolchain identifier.
3) New methods to access Toolchains in the registry:
   - All toolchain(s) with the given identifier
   - Toolchain (if any) for the given path
2019-01-22 14:12:50 -05:00
Marcin Krzyzanowski
6df3545f42 Use BuildSetup in place of Configuration.
Add BuildConfiguration
Cleanup imports
2019-01-15 20:49:38 +01:00
Marcin Krzyzanowski
1e035fdfd5 Completion item returns type name in details 2019-01-15 13:37:41 +01:00
Marcin Krzyzanowski
736fdcdac4 Lipstick style - self 2019-01-11 20:01:55 +01:00
Marcin Krzyzanowski
398ff33b9f SKCore.Configuration reflects a server setup and is passed as a depedency injection deep down. 2019-01-11 19:51:04 +01:00
Marcin Krzyzanowski
a10bd394e0 Pass server configuration down to SwiftPMWorkspace (dependency injection) 2019-01-11 17:54:28 +01:00
Marcin Krzyzanowski
25939e9526 Add command line arguments with a few configuration options. 2019-01-11 00:24:27 +01:00
Ben Langmuir
1d78d55f08 Merge pull request #15 from rintaro/completion-adjustlocation-fix
[Completion] Fix crash for completion on identifier at the start of file
2019-01-07 08:34:06 -08:00
Rintaro Ishizaki
f99b70781b [Completion] Make adjustCompletionLocation() safe for out of range
Make it optional.
2018-12-25 15:32:45 +09:00
Rintaro Ishizaki
4b0b0ec0aa [Completion] Fix crash for completion on identifier at the start of file
Crash where a code completion is triggered on an identifier at the start
of file. `Fatal error: Can't move before startIndex`.
2018-12-25 15:32:45 +09:00
Eric Stern
73ba7f4eef Correct location property of DiagnosticRelatedInformation 2018-12-24 14:35:01 -08:00
Abdullah Selek
4f4ac81f3b Remove extra spaces before func. 2018-12-17 21:09:42 +00:00
Bruno Rocha
97d7219a1c [Fold] Avoid erasing the structure stack 2018-12-14 14:17:03 -02:00
Ben Langmuir
d7b0b62038 Merge pull request #49 from benlangmuir/fold-url
[swift] Fix folding range for comment.url, comment.mark types
2018-12-14 07:15:04 -08:00
Ben Langmuir
cf18088bea [swift] Fix folding range for comment.url, comment.mark types
Just a couple of syntaxtypes that got missed.
2018-12-13 21:18:35 -08:00
Ben Langmuir
b72d37d70f [swift] Sort folding ranges
This isn't strictly necessary, but it makes the output more predictable
for testing and eliminates any possible non-determinism in the
responses.
2018-12-13 20:27:48 -08:00
Ben Langmuir
de7ad054ef [swift] Remove speculatively written cancellation code
This code is dead and I have no idea if it's ever going to be useful; it
was written completely speculatively. Goodbye.
2018-12-13 18:12:10 -08:00
Ben Langmuir
8270818b80 [clangd] Save the server capabilities and use it to avoid unsupported request
While the server supports foldingRange in general, clangd may not
support it, so add a mechanism for capturing the server capabilities and
using them to avoid unsupported requests to clangd (instead, return
nil). This avoids interruptions due to "method not found" errors that
get surfaced very noisily in the IDE.
2018-12-13 10:56:29 -08:00
Ben Langmuir
51d926cffc Merge pull request #24 from rockbruno/foldingRange
Add "textDocument/foldingRanges"
2018-12-13 08:57:31 -08:00
Bruno Rocha
c4f4038ed2 Abort folding range requests after reaching the client's limit 2018-12-13 13:39:22 -02:00
Abdullah Selek
9c6fd98d38 Use Void over () on SourceKit files. 2018-12-08 18:29:13 +00:00
Bruno Rocha
37d14d486d Fold doc comments 2018-12-08 16:07:54 -02:00
Bruno Rocha
05eee7a92a Folding Ranges gardening 2018-12-08 16:07:54 -02:00
Bruno Rocha
c4603e4da3 Folding Ranges improvements and gardening 2018-12-08 16:07:54 -02:00
Bruno Rocha
3f58e09dcf Add folding range requests
Add remaining foldingRange protocol capabilities

Sending offset data to folding requests

FoldingRange test

Support folding comments

Add test for folded comments
2018-12-08 16:07:54 -02:00
Ben Langmuir
dc32473696 Merge pull request #36 from benlangmuir/symbol-info
[sourcekit] Adopt symbolInfo to implement definition and references
2018-12-07 10:04:31 -08:00
Ben Langmuir
8b3cf55022 [swift] Cleanup CursorInfo and Hover requests
Factors the cursor_info requests into a single API to asynchronously
make the sourcekitd cursor_info request and wrap the result for easier
consumption from Swift (but not other processing).

Also, cleanup the now unused extensions on Hover that were superceded by
symbolInfo.
2018-12-07 00:41:45 -08:00
Ben Langmuir
f7288278f6 [sourcekit] Adopt symbolInfo to implement definition and references
Replaces the Hover request extension that was only provides by Swift
with the new symbolInfo LSP extension that clangd also support. This
enables jump-to-defintion an find-references for C/C++/ObjC by using
clangd to find the symbol and then performing an index query to find the
defintion.

rdar://46436917
2018-12-06 23:09:15 -08:00
Ben Langmuir
4b3b7ba768 [swift] Add bestKnownDeclaration location to symbolInfo for Swift
This is useful for local jump to definition. For now, only swift
implements this.
2018-12-06 22:56:23 -08:00
Ben Langmuir
7c82c9b583 [swift] Implement symbolInfo for Swift 2018-12-06 22:38:25 -08:00
josh
22a49414e8 Fix merge conflicts (Toolchain, SwiftPMWorkspace, SwiftLanguageServer) 2018-12-07 13:39:43 +09:00
yhkaplan
3ef53f3f23 Use trailing closure with Kevin's syntax 2018-12-07 13:29:38 +09:00
Joshua Kaplan
06144c9901 Mark unused completion handler properties as _ 2018-12-07 13:29:16 +09:00
Joshua Kaplan
e3ade6c50f Use Void over () 2018-12-07 13:29:16 +09:00
Ben Langmuir
6c1c5d3283 Add textDocument/symbolInfo LSP extension
Clangd provides a symbolInfo request as an extension to LSP that is
equivalent to sourcekitd's cursor info. For now, just add the new types
and add plumb the request through so we can test it in isolation. In a
future commit this will be used to power jump-to-definition.
2018-12-06 20:06:51 -08:00
Ben Langmuir
c17ae6992a [build-system] Rename BuildSettingsProviderList -> BuildSystemList 2018-12-03 23:05:35 -08:00
Ben Langmuir
7f74d4a25f [build-system] Fold ExternalWorkspace into BuildSystem
Simplifies clients to only need to care about one thing, and makes it
easier for BuildSystems to grow new functionality.
2018-12-03 22:54:35 -08:00
Ben Langmuir
63b9b3dbaf [build-system] Rename BuildSettingsProvider->BuildSystem and fix method name
I intend to fold more things than file-settings into here, so use a more
generic name. Also drop an unnecessary word from the method name.
2018-12-03 22:30:18 -08:00
Ben Langmuir
a7999dd3d1 Merge pull request #27 from benlangmuir/fix-warnings
[build] Fix warnings about Foundation.Process on Linux
2018-12-02 09:55:26 -08:00