Alex Hoppen
1770204e5d
Implement test discovery for swift-testing tests for the textDocument/tests request
...
This allows us to return swift-testing tests within a single document. It does not look for swift-testing tests workspace-wide (the `workspace/tests` request), which will be a follow-up PR.
2024-04-15 21:50:16 -07:00
Alex Hoppen
67a73f47c1
Return document tests in a hierarchical format
...
Same as for workspace tests, instead of returning a flat list of symbols, return a hierarchical structure.
2024-04-05 20:18:46 -07:00
Alex Hoppen
65b9505081
Return workspace tests in a hierarchical format
...
This ways the client doesn’t need to create a hierarchical structure using the container names. It is also more flexible and allows nesting of test suites + the addition of labels and tags for swift-testing.
The data structure for `TestItem` has been heavily inspired by VS Code’s `TestItem` for the test explorer, which should make it fairly straightforward to integrate these results into the VS Code test explorer.
2024-04-05 20:16:06 -07:00
Alex Hoppen
8e9c19ac61
Don’t fatalError when constructing DocumentURI from an invalid URL
2024-04-04 11:05:49 -07:00
Max Desiatov
747c39b3b6
Remove unused import Dispatch from Message.swift ( #1156 )
...
This import is unused and is redundant in that file
2024-03-31 09:04:39 -07:00
Alex Hoppen
d1b527e14c
Make the LanguageServerProtocolJSONRPC module build with strict concurrency enabled
2024-03-20 08:37:39 +01:00
Alex Hoppen
3007d9f392
Naming improvements, added comments and typo fixes in connection related code
...
This should make the code easier to understand. No functionality change.
2024-03-20 08:30:16 +01:00
Alex Hoppen
7c46df3abe
Remove clientID from request handling
...
The client ID was needed when a `MessageHandler` could handle messages from multiple connections. We don’t support this anymore (because it wasn’t needed) and so the client ID doesn’t need to get passed through as well.
2024-03-20 08:28:26 +01:00
Alex Hoppen
a6fdd1d0d8
Merge pull request #1117 from ahoppen/ahoppen/sendability
...
Add Sendable annotations to LanguageServerProtocol, LSPLogging and SKSupport
2024-03-07 18:27:26 -08:00
Alex Hoppen
5e2fc40b8c
Report whether sourcekit-lsp supports the workspace/tests and textDocument/tests requests
...
Fixes #1098
rdar://123771703
2024-03-04 23:16:20 -08:00
Alex Hoppen
8ea9c534f3
Add Sendable annotations to SKSupport
2024-03-03 21:50:38 -08:00
Alex Hoppen
fa54ef1748
Add Sendable annotations to LanguageServerProtocol
2024-03-03 21:50:38 -08:00
Alex Hoppen
fef3cb8f64
Sort results returned by the index
...
rdar://123487052
2024-02-29 13:07:28 -08:00
Alex Hoppen
1877d470a3
Use pull diagnostics by default in tests
...
Currently, all tests send publish diagnostics notifications, which is noise in the logs for most tests. Change the tests to use the pull diagnostics model by default and make the push diagnostic model opt-in.
rdar://123241539
2024-02-27 19:06:20 -08:00
Alex Hoppen
bfb9040fbf
Support cross-file rename for clang languages
...
This uses the indexed rename request I added to clangd to perform global rename in clang’s language using SourceKit-LSP’s index: SourceKit-LSP’s index is used to find the locations to rename and the indexed rename request to clangd is used to translate the rename locations to edits.
rdar://118996369
2024-01-23 21:56:09 -08:00
Alex Hoppen
e8e4fb2106
Merge pull request #1011 from krzyzanowskim/marcin/fix-array-decoding
...
Fix decoding Array of LSPAnyCodable
2024-01-09 18:13:26 -08:00
Alex Hoppen
e0fe9d6aa1
Merge pull request #1012 from krzyzanowskim/marcin/semantictokentypes
...
Refactor SemanticTokenTypes, SemanticTokenModifiers
2024-01-08 18:14:28 -08:00
Marcin Krzyzanowski
72e28b1a6a
Indicate failure if array element can't get decoded
2024-01-08 23:59:07 +01:00
Marcin Krzyzanowski
1e799a8cd3
Document deprecated property
2024-01-08 23:44:11 +01:00
Marcin Krzyzanowski
c7b0a68b4f
add deprecated serverSideFiltering for backward compatibility
2023-12-28 00:10:27 +01:00
Marcin Krzyzanowski
0797a361d8
Add files to CMake files
2023-12-27 20:23:44 +01:00
Marcin Krzyzanowski
2c616f7838
Refactor SemanticTokenTypes, SemanticTokenModifiers
2023-12-26 22:55:12 +01:00
Marcin Krzyzanowski
6a369f5754
Fix decoding Array of LSPAnyCodable
2023-12-26 00:51:23 +01:00
Alex Hoppen
e4c2a3fe32
Merge pull request #1002 from krzyzanowskim/marcin/missing-initializers-2
...
More public initializers
2023-12-20 14:13:54 -08:00
Marcin Krzyzanowski
11d6e55f49
Update formatting
2023-12-16 16:18:11 +01:00
Alex Hoppen
4f5186e1d2
Merge pull request #997 from krzyzanowskim/marcin/missing-initializer-worskapce-folders
2023-12-14 17:16:23 -08:00
Marcin Krzyzanowski
a8cd9bfe05
More public initializers
2023-12-14 21:08:45 +01:00
Marcin Krzyzanowski
8eeec74904
Add public initializer
2023-12-13 21:46:45 +01:00
Alex Hoppen
5a7a91027a
Merge pull request #995 from krzyzanowskim/marcin/missing-initializer
...
WillSaveTextDocumentNotification public initializer
2023-12-13 12:44:21 -08:00
Marcin Krzyzanowski
c614d6bd56
Public initializer
2023-12-13 15:31:13 +01:00
Alex Hoppen
d931806c69
Merge pull request #988 from z2oh/configure-workspace-type
...
Allow configuring workspace type via flag
2023-12-12 10:50:52 -08:00
Alex Hoppen
ce9fdf9258
Merge pull request #990 from ahoppen/ahoppen/rename
...
Implement local rename within the current file
2023-12-11 19:39:35 -08:00
Alex Hoppen
8acc5bd999
Factor related identifiers request into a separate file
...
This allows use to re-use related identifiers when implementing rename
2023-12-09 08:34:40 -08:00
Jeremy Day
c006421667
Switch to more descriptive case names
2023-12-08 15:23:03 -08:00
Jeremy Day
3278ff0612
Enable per-workspace configuration of default workspace type
2023-12-08 11:06:11 -08:00
Alex Hoppen
96905aaf16
Add a request to get all tests within a file
2023-12-06 17:40:21 -08:00
Alex Hoppen
446f9280da
Add a request to list all the tests within the current workspace
...
Fixes #611
rdar://98710526
2023-12-06 17:40:21 -08:00
Alex Hoppen
ed410e6503
Merge pull request #977 from ahoppen/ahoppen/jump-to-override
...
Show overriden functions when performing jump-to-definition on a dynamic call
2023-12-05 16:18:46 -08:00
Marcin Krzyzanowski
b7cc49bcfa
Decode RegistrationOptions ( #980 )
2023-11-30 00:46:03 -08:00
Alex Hoppen
84fdea9e05
Filter overrides in DefinitionRequest by receiver types
2023-11-29 09:03:36 -08:00
Alex Hoppen
4052465905
Show overriden functions when performing jump-to-definition on a dynamic call
...
Fixes #809
rdar://114864256
2023-11-29 09:02:02 -08:00
Alex Hoppen
33f4612243
Add support for different arguments per workspace
...
Fixes #663
rdar://101815704
2023-11-28 11:19:09 -08:00
Max Desiatov
d5831963cd
Fix typo in LanguageServerProtocol/Error.swift ( #970 )
2023-11-27 10:08:02 +05:30
Saleem Abdulrasool
8f53d08b50
build: correct dependencies
...
The changes in #945 changed the dependencies but did not correct them in
the CMakeLists.txt resulting in a broken build. Resynchronise the
dependencies across Package.swift and CMake.
2023-11-01 11:12:08 -07:00
Alex Hoppen
ac3eb32e65
Format sources with swift-format
2023-10-31 19:30:31 -07:00
Alex Hoppen
e0173c8740
Merge pull request #956 from ahoppen/ahoppen/dont-log-error-for-unknown-notifications
...
Reduce logging level for unknown notifications or requests
2023-10-31 17:05:43 -07:00
Alex Hoppen
9a87691853
Merge pull request #945 from ahoppen/ahoppen/language-server-protocol-dependency-free
...
Make the `LanguageServerProtocol` module dependency-free
2023-10-31 16:02:50 -07:00
Alex Hoppen
aa70fc0e8d
Make the LanguageServerProtocol module dependency-free
...
Shuffle a few types around so that the `LanguageServerProtocol` has no more dependencies.
Fixes #938
rdar://117565087
2023-10-31 13:22:38 -07:00
Alex Hoppen
389cb914c6
Merge pull request #918 from JCWasmx86/main
...
Validate ClangWorkspaceSettings before preferring it over unknown WorkspaceSettingsChanges
2023-10-31 13:18:01 -07:00
Alex Hoppen
35c52c7590
Allow creation of TaskMetadata for all known notification and request types
...
Previously, we would sometimes log errors for example for the `setTrace` notification sent by VS Code. To avoid those logs, add cases for all known requests and notifications to the `TaskMetadata` initializers.
2023-10-31 09:12:24 -07:00