Skip to content

Commit

Permalink
feat: add get sdks callback listener
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiandoetsch committed Oct 8, 2024
1 parent 0bb3452 commit 1a38858
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- added ai fix feedback support
- enable for IntelliJ 2024.3 platform
- require LS protocol version 16
- transmit project sdks to language server
- transmit project sdks to language server when requested by a scan

### Fixes
- add name to code vision provider
Expand Down
8 changes: 4 additions & 4 deletions src/main/kotlin/snyk/common/lsp/SnykLanguageClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ class SnykLanguageClient :
}
}

@JsonRequest(value = "$/snyk.getSDKs")
fun getSdks(workspaceFolder: WorkspaceFolder) : List<LsSdk> {
val project = guessProjectForFile(workspaceFolder.uri.toVirtualFile()) ?: return emptyList()
return SdkHelper.getSdks(project)
@JsonRequest(value = "workspace/snyk.sdks")
fun getSdks(workspaceFolder: WorkspaceFolder) : CompletableFuture<List<LsSdk>> {
val project = guessProjectForFile(workspaceFolder.uri.toVirtualFile()) ?: return CompletableFuture.completedFuture(emptyList())
return CompletableFuture.completedFuture(SdkHelper.getSdks(project))
}


Expand Down

0 comments on commit 1a38858

Please sign in to comment.