4384 Commits

Author SHA1 Message Date
Alex Hoppen
ce86aae504 Merge pull request #2483 from ahoppen/explicitly-close-index swift-DEVELOPMENT-SNAPSHOT-2026-03-01-a 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
Alex Hoppen
5b44eb2c5b Merge pull request #2460 from ahoppen/match-upcoming-features
Match enabled upcoming features from Package manifest in CMakeLists.txt
2026-02-28 19:09:19 +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
Alex Hoppen
5440f6d5ee Merge pull request #2471 from Steffeeen/docc-topic-test
Add a test for the topic section in the DocC preview
2026-02-26 08:25:59 +01:00
Alex Hoppen
efe7286482 Merge pull request #2491 from PhantomInTheWire/feat/remove-redun-paren
Add RemoveRedundantParentheses refactoring action
2026-02-25 13:26:25 +01:00
Steffen
2699838a3c Add a test for the topic section in the DocC preview 2026-02-25 09:41:49 +01:00
Steffen
1558368226 Support a list of tuples for expectedResponses in DoccDocumentationTests
This is useful in cases where we want to check for multiple nodes at a
single position.
2026-02-25 09:41:49 +01:00
Karan
7435345133 Add RemoveRedundantParentheses refactoring action
Signed-off-by: Karan <karanlokchandani@protonmail.com>
2026-02-23 01:07:05 +05:30
Alex Hoppen
eab73dce3c Merge pull request #2470 from noctule-ide/jansorg-noctule swift-DEVELOPMENT-SNAPSHOT-2026-02-24-a swift-DEVELOPMENT-SNAPSHOT-2026-02-23-a 2026-02-21 17:57:20 +01:00
Joachim Ansorg
dcdb9e01cf Document Noctule integration for JetBrains IDEs
Added information about Noctule for JetBrains IDEs and its configuration.
Noctule is currently the only plugin for JetBrains IDEs, which is supporting cross-platform Swift support and support for Swift PM.

Noctule is a closed-source extension. It's currently offering all features for free, but will become freemium or paid software in the future.

It's okay if you don't want to mention Noctule because it's closed-source or commercial.
2026-02-17 16:27:39 +01:00
Rintaro Ishizaki
2d699a1b86 Merge pull request #2482 from rintaro/testsupport-no-gpg-sign
[TestSupport] Don't try to GPG-sign commits
swift-DEVELOPMENT-SNAPSHOT-2026-02-19-a
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
Alex Hoppen
109613dbb4 Merge pull request #2479 from glessard/filter-with-typed-throws
[test] change to expect the updated signature of `filter()`
2026-02-13 18:08:53 +01: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
Guillaume Lessard
9ef5e64731 [test] change to expect the updated signature of filter() 2026-02-09 18:26:09 -08:00
Alex Hoppen
c2a47eed7b Merge pull request #2477 from ahoppen/editor-list
Clarify that editors listed in the Editor Integration document should be free of charge
2026-02-10 02:41:12 +01:00
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
Alex Hoppen
8b5077d863 Merge pull request #2474 from rockbruno/patch-2
Fix inverted log check when updating the index store
2026-02-09 11:26:23 +01:00
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
Alex Hoppen
c7a2dca6aa Clarify that editors listed in the Editor Integration document should be free of charge 2026-02-08 16:39:11 +01:00
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
Anthony Latsis
b1118af400 Merge pull request #2473 from swiftlang/jepa
.github: Use issue types instead of labels in issue templates
swift-DEVELOPMENT-SNAPSHOT-2026-02-06-a swift-DEVELOPMENT-SNAPSHOT-2026-02-05-a
2026-02-04 04:18:04 +00:00
Anthony Latsis
6c7fda7bf2 .github: Use issue types instead of labels in issue templates 2026-02-03 11:40:50 +00:00
Alex Hoppen
0ef6bcd6c1 Merge pull request #2466 from Steffeeen/fix-warnings
Fix compile warnings in Sources and Tests
swift-DEVELOPMENT-SNAPSHOT-2026-02-02-a
2026-01-31 12:11:59 +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
Hamish Knight
f2d661bbb5 Merge pull request #2462 from etcwilde/ewilde/freebsd-sourcekit-rpath
FreeBSD: Include freebsd runtimes in rpath
swift-DEVELOPMENT-SNAPSHOT-2026-01-31-a swift-DEVELOPMENT-SNAPSHOT-2026-01-30-a
2026-01-28 18:29:23 +00:00
Evan Wilde
3df4dcde2b FreeBSD: Include freebsd runtimes in rpath
Running sourcekit-lsp built by Swift CI on FreeBSD results in the
following error:

```
ld-elf.so.1: Shared object "libswiftCore.so" not found, required by "sourcekit-lsp"
```

The runpath is pointing at a location in CI rather than the
binary-relative location where we can find the runtime libraries.
2026-01-26 17:32:03 -08:00
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
Alex Hoppen
8829407798 Match enabled upcoming features from Package manifest in CMakeLists.txt
These drifted out-of-sync. Bring them in sync again.
2026-01-18 22:22:12 +01:00
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