|
8 | 8 | [](https://blog.rust-lang.org/) |
9 | 9 | [](https://github.com/rust-secure-code/safety-dance/) |
10 | 10 |
|
11 | | -A universal Language Server Protocol (LSP) server for dependency management across Cargo, npm, PyPI, Go, Bundler, Dart, Maven, and Gradle ecosystems. |
| 11 | +A universal Language Server Protocol (LSP) server for dependency management across Cargo, npm, PyPI, Go, Bundler, Dart, Maven, Gradle, and Swift ecosystems. |
12 | 12 |
|
13 | 13 | ## Features |
14 | 14 |
|
15 | 15 | - **Intelligent autocomplete** — Package names, versions, and feature flags |
16 | 16 | - **Version hints** — Inlay hints showing latest available versions |
17 | 17 | - **Loading indicators** — Visual feedback during registry fetches with LSP progress support |
18 | | -- **Lock file support** — Reads resolved versions from Cargo.lock, package-lock.json, poetry.lock, uv.lock, go.sum, Gemfile.lock, pubspec.lock |
| 18 | +- **Lock file support** — Reads resolved versions from Cargo.lock, package-lock.json, poetry.lock, uv.lock, go.sum, Gemfile.lock, pubspec.lock, Package.resolved |
19 | 19 | - **Diagnostics** — Warnings for outdated, unknown, or yanked dependencies |
20 | 20 | - **Hover information** — Package descriptions with resolved version from lock file |
21 | 21 | - **Code actions** — Quick fixes to update dependencies |
@@ -49,9 +49,17 @@ deps-lsp is optimized for responsiveness: |
49 | 49 | | Dart | Pub | `pubspec.yaml` | ✅ Supported | |
50 | 50 | | Java | Maven | `pom.xml` | ✅ Supported | |
51 | 51 | | Java | Gradle | `libs.versions.toml`, `build.gradle.kts`, `build.gradle`, `settings.gradle` | ✅ Supported | |
| 52 | +| Swift | SPM | `Package.swift` | ✅ Supported | |
52 | 53 |
|
53 | 54 | > [!NOTE] |
54 | | -> PyPI support includes PEP 621, PEP 735 (dependency-groups), and Poetry formats. Go support includes require, replace, and exclude directives with pseudo-version handling. Bundler support includes git, path, and GitHub sources plus pessimistic version requirements (`~>`). Dart support includes hosted, git, path, and SDK dependency sources with caret version semantics. Maven support covers `dependencies`, `dependencyManagement`, and `build/plugins` sections with Maven qualifier-aware version comparison. Gradle support covers Version Catalogs (`libs.versions.toml`), Kotlin DSL (`build.gradle.kts`), Groovy DSL (`build.gradle`), and `settings.gradle` plugin declarations with version.ref resolution. Packages are resolved from Maven Central, Google Maven (Android), and Gradle Plugin Portal (fallback). |
| 55 | +> **Ecosystem details:** |
| 56 | +> - **PyPI** — PEP 621, PEP 735 (dependency-groups), Poetry formats |
| 57 | +> - **Go** — `require`, `replace`, `exclude` directives, pseudo-version handling |
| 58 | +> - **Bundler** — git/path/GitHub sources, pessimistic operator (`~>`) |
| 59 | +> - **Dart** — hosted, git, path, SDK sources, caret version semantics |
| 60 | +> - **Maven** — `dependencies`, `dependencyManagement`, `build/plugins`, qualifier-aware version comparison |
| 61 | +> - **Gradle** — Version Catalogs, Kotlin/Groovy DSL, `settings.gradle` plugins; resolves from Maven Central, Google Maven, Gradle Plugin Portal |
| 62 | +> - **Swift** — all `.package()` forms (from, upToNextMajor/Minor, exact, range, branch, revision, path); versions via GitHub API tags |
55 | 63 |
|
56 | 64 | ## Installation |
57 | 65 |
|
@@ -117,6 +125,7 @@ cargo install deps-lsp --no-default-features --features "pypi" |
117 | 125 | | `dart` | Dart | pubspec.yaml | ✅ | |
118 | 126 | | `maven` | Java | pom.xml | ✅ | |
119 | 127 | | `gradle` | Java | libs.versions.toml, build.gradle.kts, build.gradle | ✅ | |
| 128 | +| `swift` | Swift | Package.swift | ✅ | |
120 | 129 |
|
121 | 130 | ## Usage |
122 | 131 |
|
@@ -154,7 +163,7 @@ Enable inlay hints in Zed settings: |
154 | 163 | ```lua |
155 | 164 | require('lspconfig').deps_lsp.setup({ |
156 | 165 | cmd = { "deps-lsp", "--stdio" }, |
157 | | - filetypes = { "toml", "json", "gomod", "ruby", "yaml", "xml" }, |
| 166 | + filetypes = { "toml", "json", "gomod", "ruby", "yaml", "xml", "swift" }, |
158 | 167 | }) |
159 | 168 |
|
160 | 169 | -- Enable inlay hints (Neovim 0.10+) |
@@ -297,6 +306,7 @@ deps-lsp/ |
297 | 306 | │ ├── deps-dart/ # pubspec.yaml parser + pub.dev registry |
298 | 307 | │ ├── deps-maven/ # pom.xml parser + Maven Central registry |
299 | 308 | │ ├── deps-gradle/ # Gradle parser (Version Catalog, Kotlin/Groovy DSL) |
| 309 | +│ ├── deps-swift/ # Package.swift parser + GitHub API registry |
300 | 310 | │ ├── deps-lsp/ # Main LSP server |
301 | 311 | │ └── deps-zed/ # Zed extension (WASM) |
302 | 312 | ├── .config/ # nextest configuration |
|
0 commit comments