-
Notifications
You must be signed in to change notification settings - Fork 328
Description
Swift version
swift-driver version: 1.127.14.1 Apple Swift version 6.2 (swiftlang-6.2.0.19.9 clang-1700.3.19.1) Target: arm64-apple-macosx26.0
Platform
macOS 26
Editor
Helix
Description
When I create a new file in helix (e.g., by using :o <filepath>
), although code completion and diagnostics keep working on this file, they lack any of the symbols of the module the file is placed in. Only after restarting the server via :LspRestart
do the symbols appear correctly.
From what I could gather in the logs, source-kit receives the textDocument/didOpen
notification from helix, but it does not seem to recognize the workspace of the file:
Build settings for file:///Users/dfortes/Developer/dump/SomeProject/Sources/SomeProject/Other.swift (1/1)
Compiler Arguments:
-sdk
/Applications/Xcode-26.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk
/Users/dfortes/Developer/dump/SomeProject/Sources/SomeProject/Other.swift
Working directory:
<nil>
and
Producing syntactic diagnostics from the built-in swift-syntax because we have fallback build settings)
Steps to Reproduce
Create a new project:
mkdir SomeProject
cd SomeProject
swift package init
Open the helix editor:
hx Sources/SomeProject/SomeProject.swift
Set the source code to something like:
struct Model {
var x: Int
}
Open a new file by using the command: :o Sources/SomeProject/OtherFile.swift
; code completion will still work for libraries like Foundation, but the Model
struct won't be found.