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.
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.
`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.
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.
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.
- 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)
- 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