Bruno Rocha
a84eaaa478
Apply review comments (LSPAnyCodable/Cleaning)
2019-10-03 11:37:24 -03:00
Bruno Rocha
8861ac06c1
Add Local Refactoring
2019-10-03 11:20:41 -03:00
Ben Langmuir
56b1f0ba99
[diagnostics] Clear cached diagnostics on close
...
While we ideally could maintain diagnostics state for closed documents
as the LSP specification encourages, since we have no way to do that
today, it's better to throw out diagnostics for closed documents so that
they do not sit around stale. We do not send a publishDiagnostics
though, so the editor can maintain the list of diagnostics if desired,
but when we reopen the document we can provide completely fresh data.
2019-10-02 16:10:21 -07:00
Ben Langmuir
70af0734cb
[diagnostics] Fix caching of diagnostics across files
...
We were sending back (and clearing) all cached diagnostics, not just the
ones for the current file.
2019-10-02 16:10:20 -07:00
Ben Langmuir
2c460cb2d5
Move custom PositionRange encoding into a property wrapper
...
This lets us use the `Range<Position>` without manually converting back
and forth in the majority of cases. See the note on HoverResponse for
the behaviour with Optional that makes us have to provide a custom
Codable implementation in two places that used to be synthesized.
2019-10-02 14:38:40 -07:00
Bruno Rocha
20c026c8e2
Cleaning Code
2019-09-24 17:59:38 -03:00
Bruno Rocha
c20fe44c42
Convert CommandArgumentType -> LSPAny references
2019-09-24 17:21:32 -03:00
Bruno Rocha
7180d66e60
Avoid using decoders for retrieving dictionary data
2019-09-24 17:21:32 -03:00
Bruno Rocha
e71965fc7d
Inject metadata at commands
2019-09-24 17:21:32 -03:00
Bruno Rocha
cef91670f5
Add ExecuteCommand/ApplyEdit
2019-09-24 17:21:32 -03:00
David Goldman
e5caf44fda
Add a BuildSystemDelegate which supports notifications for build settings changes
...
Introduce a `BuildSystemDelegate` to handle notifications from the build system
* `SourceKitServer` is the main delegate to process these notifications
* Currently limited to changes in `FileBuildSettings`
* Delegate informs the `BuildSystem` of files to watch via `registerChangeWatching(for: URL)` and `unregisterChangeWatching(for: URL)`
* In the future we could have more integration for handling changes in dependencies
Handling changes in `FileBuildSettings`
* `SourceKitServer` sends notifications to the internal LSPs informing them of any opened documents that have changes in their compiler flags
* For clangd, we send a notification to update the compilation database
* For SourceKit/sourcekitd we must close and reopen the file to force a new AST with the new compiler flags
2019-09-06 17:44:36 -04:00
Ben Langmuir
e1fa70d086
Update SPM -> TSC module name prefixes
2019-09-03 08:29:19 -07:00
Ben Langmuir
3322f35ccc
[diagnostics] Keep semantic diagnostics until a semantic update
...
Sourcekitd returns parse diagnostics immediately after edits, but we do
not want to clear the semantic diagnostics until we have semantic level
diagnostics from after the edit.
2019-08-27 07:13:28 -07:00
Ben Langmuir
32497e6af9
Move diagnostic conversion into its own file
2019-08-26 21:57:37 -07:00
Ben Langmuir
e6392eb179
Fix typo public -> publish
2019-08-26 14:16:37 -07:00
Ben Langmuir
aa6087a2c8
Remove testable imports of SourceKit
2019-08-08 22:28:10 -07:00
cukr
719bed2be0
Response to code review
2019-08-08 23:00:03 +02:00
cukr
7b6197394f
Merge remote-tracking branch 'upstream/master' into implementation
...
# Conflicts:
# Sources/LanguageServerProtocol/ServerCapabilities.swift
# Sources/SourceKit/SourceKitServer.swift
# Tests/LanguageServerProtocolJSONRPCTests/CodingTests.swift
2019-08-07 10:48:30 +02:00
Argyrios Kyrtzidis
9bc43b7dc3
Merge pull request #127 from millenomi/foundationxml
...
FoundationXML: Adoption
2019-07-31 18:05:33 -07:00
Lily Vulcano
810eb2b8fc
FoundationXML: Adoption
...
CommentXML.swift needs to import `FoundationXML` if available.
2019-07-31 15:23:37 -07:00
cukr
7667608eef
Implement "textDocument/implementation" request
2019-07-24 14:42:10 +02:00
Bruno Rocha
7d201f353a
Add EditorPlaceholder parsing
2019-07-06 13:59:23 -03:00
Bruno Rocha
7d066d0e66
Omit completion displayNames when there's no snippet support
2019-07-01 18:57:41 -03:00
Bruno Rocha
587cd892bb
Support clients without completion snippets
2019-06-30 15:13:11 -03:00
Ben Langmuir
8482476ff8
Merge pull request #72 from rockbruno/code-actions-api
...
Add CodeActions/Command structure
2019-06-27 16:05:28 -07:00
cukr
5329b47d12
Tone down on what is escaped to prevent Sublime Text from showing wrong name
2019-06-25 18:24:54 +02:00
cukr
0d15fdf6be
Add markdown escaping for names in hover request
2019-06-25 14:15:57 +02:00
Bruno Rocha
a60c50d1db
Make CodeAction wrapper types an enum
2019-06-19 22:57:40 -03:00
Bruno Rocha
7a97393945
Make CommandArguments an enum
2019-06-19 22:00:18 -03:00
Bruno Rocha
69b6663005
Add CodeActions/Command (Rework)
2019-06-19 22:00:18 -03:00
Bruno Rocha
5406e861b0
Add codeActions API
2019-06-19 21:57:58 -03:00
Ben Langmuir
20662cd553
Merge pull request #107 from Trzyipolkostkicukru/color-literal
...
Implement color presentation
2019-06-19 13:06:18 -07:00
cukr
ba11bd9978
Fix formatting
2019-06-16 20:03:03 +02:00
Marcin Krzyzanowski
fb2d4d14b8
Embrace Swift.Result in place SwiftPM.Basic.Result
2019-06-10 11:24:53 +02:00
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
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
Marcin Krzyzanowski
1e035fdfd5
Completion item returns type name in details
2019-01-15 13:37:41 +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
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