Alex Hoppen
ce86aae504
Merge pull request #2483 from ahoppen/explicitly-close-index
2026-03-01 08:18:19 +01:00
Alex Hoppen
ad4b87ce6b
Merge pull request #2467 from Steffeeen/selection-range
2026-03-01 08:17:54 +01:00
Steffeeen
d748f80896
Implement support for textDocument/selectionRange
...
This enables hierarchical selection expansion in supported editors.
Selection ranges are computed from the AST by walking upward from the
smallest enclosing node to the root. This is implemented by AST nodes
conforming to the `SelectionRangeProvider` protocol. Most nodes use a
default implementation which returns the node's `trimmedRange`.
Other nodes are special-cased to adjust the returned selection ranges
based on other factors.
2026-02-26 09:15:01 +01:00
Karan
7435345133
Add RemoveRedundantParentheses refactoring action
...
Signed-off-by: Karan <karanlokchandani@protonmail.com >
2026-02-23 01:07:05 +05:30
Rintaro Ishizaki
2d699a1b86
Merge pull request #2482 from rintaro/testsupport-no-gpg-sign
...
[TestSupport] Don't try to GPG-sign commits
2026-02-16 10:20:23 -08:00
Alex Hoppen
2f472da57b
Merge pull request #2443 from loveucifer/multiline-string-interpolation
...
add support for multi-line string literals when converting string concatenation to string interpolation
2026-02-16 15:51:23 +01:00
Alex Hoppen
425e1322a1
Explicitly close the index when shutting down SourceKit-LSP
...
`IndexStoreDB` moves its index to the `saved` directory when it is deallocated. Because `IndexStoreDB` is primarily owned by `UncheckedIndex`, we rely on deallocating this object to save the index store. This is fairly brittle because various parts of the codebase may hold transient references to that object as reported in https://github.com/swiftlang/sourcekit-lsp/issues/2455#issuecomment-3873561003 .
Explicitly remove the reference from `UncheckedIndex` to `IndexStoreDB`. While this still isn’t perfect because other parts of the code base may hold references to `IndexStoreDB` but those should be a lot rarer, resulting in a more consistent closing of the index.
2026-02-15 18:02:53 +01:00
loveucifer
5b4af90a81
Apply .indented(by:)
2026-02-15 21:53:01 +05:30
Rintaro Ishizaki
c802fa995b
[TestSupport] Don't try to GPG-sign commits
...
When `commit.gpgsign = true` is enabled globally, signing fails because
the author 'Dummy <noreply@swift.org >' likey has a no configured GPG
key, causing test failures.
2026-02-14 07:10:13 -08:00
Rintaro Ishizaki
b374d47381
Merge pull request #2480 from rintaro/toolchain-skplugin-dylib
...
[ToolchainRegistry] Prefer .dylib SourceKit plugins over .framework
2026-02-12 19:23:34 -08:00
Rintaro Ishizaki
1ac6c1a2eb
[ToolchainRegistry] Don't search sourcekitdInProc.framework
...
`searchFramework` flag was not used.
2026-02-12 10:21:13 -08:00
Rintaro Ishizaki
f6c50f5e04
[ToolchainRegistry] Prefer .dylib SourceKit plugins over .framework
...
rdar://170177167
2026-02-11 14:31:34 -08:00
Alex Hoppen
0ad0ac4f15
Merge pull request #2445 from loveucifer/type-definition-request
...
Implement textDocument/typeDefinition request
2026-02-11 19:05:51 +01:00
loveucifer
f1f46f586f
Add TypeDefinition.swift to CMakeLists.txt
2026-02-10 09:23:55 +05:30
Hamish Knight
8f757b50e8
Merge pull request #2478 from hamishknight/fixed-dir
2026-02-10 00:36:20 +00:00
loveucifer
e1f1e08cc9
some fixes
2026-02-09 16:44:58 +05:30
Hamish Knight
b2f42a1c48
Test to make sure sourcekitd doesn't change working directory
...
Ensure that the working directory remains consistent across the
lifetime of `TestSourceKitLSPClient`.
2026-02-09 10:05:13 +00:00
loveucifer
e786a1450c
swift format
2026-02-08 23:25:25 +05:30
loveucifer
6028898c13
Optimize index usage for typeDefinition and inlay hint resolve requests.
2026-02-08 23:20:18 +05:30
loveucifer
c6e54fb46a
Fix multiline string support in string concatenation to interpolation refactoring
2026-02-05 13:11:40 +05:30
Bruno Rocha
282e7745ee
Fix inverted log check when updating the index store
2026-02-04 11:21:56 +01:00
loveucifer
d73aba2c39
Remove duplicate definitionLocations and call shared function
2026-01-31 13:12:51 +05:30
Steffen
4e807a4e70
Fix compile warnings in Sources and Tests
2026-01-30 15:07:44 +01:00
loveucifer
250f6f62aa
Fix multiline string indentation stripping and remove duplicate test
2026-01-30 02:58:25 +05:30
loveucifer
cccdde295c
Use any LanguageService instead of closures
2026-01-30 02:47:52 +05:30
loveucifer
5ee63b7b0c
Deduplicate helper functions between DefinitionLocations and SourceKitLSPServer
2026-01-19 17:29:23 +05:30
loveucifer
cf56bf2ce6
Address PR review feedback
...
- Add DefinitionLocations.swift to CMakeLists.txt
- Add proper documentation comments to functions in DefinitionLocations.swift
- Make indexToLSPLocation private since it's only used within the file
- Revert unrelated comment changes in InlayHintResolve.swift
- Use .only instead of .first in InlayHintResolve to avoid ambiguous types
- Refactor TypeDefinition.swift to use cleaner control flow with guard/else
- Add test for jumping to generated interface (String)
2026-01-19 17:12:33 +05:30
loveucifer
4770e0c73e
address reviewer feedback: use IndentationRemover for trivia-only indentation handling
...
- Replace custom stripIndentation with IndentationRemover
- Update test expectations to preserve content indentation (trivia-only)
- Add clarifying comment for trailing trivia removal
- Use Swift commas in conditions
- Simplify trailing trivia removal code
2026-01-19 16:44:37 +05:30
loveucifer
e0dcca98c4
merge upstream main
2026-01-18 16:37:39 +05:30
loveucifer
0e52fede00
unify definition locations
2026-01-18 16:28:55 +05:30
loveucifer
82a7726297
fix type annotation
2026-01-17 16:17:59 +05:30
loveucifer
b7e76ff90e
unify typeDefinition
2026-01-17 16:17:59 +05:30
loveucifer
2a360c046e
address comments
2026-01-17 16:17:59 +05:30
loveucifer
4d08603e30
fix trivia handling
2026-01-17 15:12:27 +05:30
loveucifer
d8b8d71fae
Implement textDocument/typeDefinition request
2026-01-16 18:13:12 +05:30
Alex Hoppen
61ba0c92a4
Merge pull request #2436 from loveucifer/inlay-hint-go-to-definition
2026-01-16 13:16:45 +01:00
Alex Hoppen
c2b575b022
Merge pull request #2450 from ahoppen/generate-uids
...
Re-generate sourcekitd UIDs
2026-01-16 12:45:08 +01:00
Alex Hoppen
155b0ce003
Merge pull request #2432 from ahoppen/suppress-superseded-sourcekitd-refactorings
...
Don’t show sourcekitd refactoring actions that have been superseded by swift-syntax refactoring actions
2026-01-16 07:42:33 +01:00
Alex Hoppen
596a51619d
Merge pull request #2419 from ahoppen/remove-test-connection
...
Remove `TestJSONRPCConnection`
2026-01-16 07:42:20 +01:00
Alex Hoppen
f21da6b574
Merge pull request #2415 from ahoppen/main-files-provider-nil
...
Do not log fault if `BuildServermanager.mainFilesProvider` is `nil`
2026-01-16 07:41:59 +01:00
Alex Hoppen
14dfc7ef77
Merge pull request #2410 from ahoppen/accumulate-sources-loop
...
Use for loops to accumulate SourceItem elements in `SwiftPMBuildServer`
2026-01-16 07:39:38 +01:00
loveucifer
4ece7f9eea
fix trailing trivia handling
2026-01-15 08:02:34 +05:30
Karan Lokchandani
473088afe6
Add position markers in the expected ranges ( #2449 )
...
this should make tests more readable, follow up to this pr
https://github.com/swiftlang/sourcekit-lsp/pull/2435
reference comment here
https://github.com/swiftlang/sourcekit-lsp/pull/2435#discussion_r2670161613
---------
Signed-off-by: Karan <karanlokchandani@protonmail.com >
2026-01-13 23:06:06 +01:00
Karan Lokchandani
55d75954e5
Add if let to guard transform ( #2420 )
...
fixes: https://github.com/swiftlang/sourcekit-lsp/issues/1569
mostly works but not sure what to do with many edge cases and has a todo
for switch statements, also this will probably have conflicts with
https://github.com/swiftlang/sourcekit-lsp/pull/2406 marking as draft
till that merges and i can resolve the conflicts.
https://github.com/user-attachments/assets/a6d07f9d-6f09-4330-8cd0-2d24bd6973fb
---------
Signed-off-by: Karan <karanlokchandani@protonmail.com >
2026-01-13 22:46:54 +01:00
loveucifer
45b1598b9a
Add InlayHintResolve.swift to CMakeLists.txt
2026-01-13 07:36:05 +05:30
Alex Hoppen
3b2ff3226f
Merge pull request #2448 from PhantomInTheWire/fix/demorgan
...
Fix bugs in demorgan implementation
2026-01-12 15:02:04 +01:00
Alex Hoppen
ca1da1af53
Re-generate sourcekitd UIDs
...
Also fix a bug that caused swift-format-ignore comments to get dropped when re-generating.
2026-01-12 14:36:32 +01:00
loveucifer
0b02672920
Restore sourcekitd_uids from main
2026-01-12 18:02:28 +05:30
loveucifer
ceaf87b6df
Run swift-format
2026-01-12 06:15:38 +05:30
loveucifer
0695d3c67c
Remove typeDefinition remnants
2026-01-12 06:02:46 +05:30