{"id":19557855,"url":"https://github.com/jbangdev/jbang-vscode","last_synced_at":"2025-09-11T09:35:59.595Z","repository":{"id":43166426,"uuid":"510413513","full_name":"jbangdev/jbang-vscode","owner":"jbangdev","description":"JBang extension for Visual Studio Code","archived":false,"fork":false,"pushed_at":"2025-08-31T08:53:46.000Z","size":565,"stargazers_count":14,"open_issues_count":24,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-31T10:23:11.857Z","etag":null,"topics":["java","jbang","vscode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbangdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"commonhaus","open_collective":"commonhaus-foundation"}},"created_at":"2022-07-04T15:34:03.000Z","updated_at":"2025-07-07T21:20:43.000Z","dependencies_parsed_at":"2024-01-04T01:29:57.336Z","dependency_job_id":"91d2a4a1-1fb7-45fc-ac13-e7b57627189b","html_url":"https://github.com/jbangdev/jbang-vscode","commit_stats":{"total_commits":156,"total_committers":2,"mean_commits":78.0,"dds":0.3076923076923077,"last_synced_commit":"b8a54c1f8379d2ad501f4f3bd685bc401f7de684"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/jbangdev/jbang-vscode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbangdev%2Fjbang-vscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbangdev%2Fjbang-vscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbangdev%2Fjbang-vscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbangdev%2Fjbang-vscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbangdev","download_url":"https://codeload.github.com/jbangdev/jbang-vscode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbangdev%2Fjbang-vscode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274609465,"owners_count":25316621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","jbang","vscode"],"created_at":"2024-11-11T04:44:16.233Z","updated_at":"2025-09-11T09:35:59.366Z","avatar_url":"https://github.com/jbangdev.png","language":"TypeScript","funding_links":["https://github.com/sponsors/commonhaus","https://opencollective.com/commonhaus-foundation"],"categories":[],"sub_categories":[],"readme":"[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/jbangdev.jbang-vscode?style=for-the-badge\u0026label=VS%20Marketplace\u0026logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=jbangdev.jbang-vscode)\n[![Installs](https://img.shields.io/visual-studio-marketplace/i/jbangdev.jbang-vscode?style=for-the-badge)](https://marketplace.visualstudio.com/items?itemName=jbangdev.jbang-vscode)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/jbangdev/jbang-vscode/ci.yaml?branch=main\u0026style=for-the-badge)](https://github.com/jbangdev/jbang-vscode/actions?query=branch%3Amain)\n[![License](https://img.shields.io/github/license/jbangdev/jbang-vscode?style=for-the-badge)](https://github.com/jbangdev/jbang-vscode/blob/main/LICENSE)\n\n# JBang for Visual Studio Code\nThis is an early work-in-progress extension for [vscode-java](https://marketplace.visualstudio.com/items?itemName=redhat.java). It aims at providing support for the [JBang](https://www.jbang.dev/) scripts written in Java (and partial support for Kotlin and Groovy).\n\n**Pre-requisites:**\n- [JBang](https://www.jbang.dev/download/) is installed and available in the PATH. Alternatively, you can set the `jbang.home` preference to point to a `JBang` installation\n- [vscode-java](https://marketplace.visualstudio.com/items?itemName=redhat.java) is installed.\n\n**Outstanding issues**:\n- Modifications to build.jbang files don't trigger autosynchronization nor do they report diagnostics. See [jbang-eclipse#25](https://github.com/jbangdev/jbang-eclipse/issues/25).\n- The Java Runtime for current file is not displayed in the status bar. See [vscode-java#2552](https://github.com/redhat-developer/vscode-java/issues/2552).\n\n## Features\n- If you open a folder containing JBang scripts, the first JBang script found will be used to configure a \"Project\"'s classpath. When configuring the `java.import.jbang.projectPerScript` setting to `true`, each script in the folder will be assigned a specific classpath. Toggling this setting requires calling the `Java: Clean Java Language Server Workspace` command to take effect.\n- Modifying JBang directives in a file will update the classpath of the file.\n- Snippets are provided for JBang directives.\n- Autocompletion for dependencies in `//DEPS` \n- Autocompletion for `//SOURCES` and `//FILES`\n- Partial autocompletion for `//JAVA_OPTIONS`, `//JAVAC_OPTIONS`, `//RUNTIME_OPTIONS` and `//COMPILE_OPTIONS`\n- Display dependency documentation on completion/hover\n- JBang scripts can be run/debugged from the `Run JBang` or `Debug JBang` codelens, that show on top of the type declaration or main method, if there is one.\n- If a (.java) script is included in a Maven or Gradle project's hierarchy, right-clicking on the script and selecting `JBang \u003e Synchronize JBang` will add the script's parent folder to the project's source path and the JBang dependencies will be added to the project's classpath.\n- Create a new JBang script from an existing template with the `JBang: Create a new script` command.\n- Annotation processors are automatically detected and configured.\n- Partial support for `build.jbang` files: If a folder containing `build.jbang` is opened, it'll be used to configure the Java settings of its //SOURCES. Currently, changes in `build.jbang` require manually triggering the `JBang \u003e Synchronize JBang` command (via codelens or context menu) to take effect.\n- Export the script as a native binary, by right-clicking on the script and selecting the `JBang \u003e Export as native binary` menu. This requires GraalVM to be installed with the native-image extension. See https://www.jbang.dev/documentation/guide/latest/usage.html#build-and-run-native-image-experimental\n- Install the script as an application available from the path, by right-clicking on the script and selecting the `JBang \u003e install application` menu. Select the application name and whether to generate a native application or not. See https://www.jbang.dev/documentation/guide/latest/install.html\n- Automagically configures JBang-managed JDKs, i.e. no need to configure `java.configuration.runtimes`.\n- Partial support for Kotlin and Groovy scripts: completion for directive and run command are available, but no classpath management when editing the files.\n- Autocompletion for [JBang catalogs](https://www.jbang.dev/documentation/guide/latest/alias_catalogs.html) (i.e. `jbang-catalog.json` files)\n\n## Preferences\n- `jbang.home`: Specifies the folder path to the JBang directory (not the executable), eg. `~/.sdkman/candidates/jbang/current`. On Windows, backslashes must be escaped, eg `C:\\\\ProgramData\\\\chocolatey\\\\lib\\\\jbang`. Used by the `JBang: Create a new script` wizard and the `Run JBang` code lens. Useful in case `jbang` is not automatically picked up from the $PATH, for some reason.\n- `jbang.wizard.templates.showDescriptions` : When set to `true` (the default), shows JBang template descriptions in the `JBang: Create a new script` wizard, else hides them.\n- `java.import.jbang.projectPerScript` : When set to `true`, each script found in the opened folder will be imported as its own project, with its own classpath. `false` by default. Toggling this setting requires calling the `Java: Clean Java Language Server Workspace` command to take effect.\n- `jbang.completion.onSelect.autosave` : When set to `true` (the default), automatically save the file after `//DEPS` completion is selected, so the classpath gets updated.\n\n## Installation:\nContinuous Integration builds can be installed from the Visual Studio Marketplace, as Pre-release builds. Alternatively, you can head to [https://github.com/jbangdev/jbang-vscode/releases/tag/latest](https://github.com/jbangdev/jbang-vscode/releases/tag/latest), download the most recent `jbang-vscode-\u003cversion\u003e.vsix` file and install it by following the instructions [here](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix).\n\n## Development Setup\n\n### Prerequisites\n\n  * [Visual Studio Code](https://code.visualstudio.com/) or compatible editors\n  * [Language Support for Java](https://marketplace.visualstudio.com/items?itemName=redhat.java)\n  * [Node.js 14+](https://nodejs.org/en/)\n  * [JDK 17+](https://adoptium.net/en-GB/temurin/releases/)\n\n### Setup\n**Step 1.** Fork and clone this repository  \n\n**Step 2.** Fork and clone the [jbangdev/jbang-eclipse repository](https://github.com/jbangdev/jbang-eclipse), which contains the JBang/Eclipse core plugin and its jdt.ls extension\n\n**Note:** Ensure that the cloned repositories are under the same parent directory:\n\n```\nYOUR_FOLDER/\n         ├──── jbang-vscode/\n         ├──── jbang-eclipse/\n```  \n**Step 3.** Navigate into `jbang-vscode/`\n```bash\n$ cd jbang-vscode/\n```  \n**Step 4.** Install npm dependencies\n```bash\n$ npm ci\n```  \n\n**Step 5.** Build the JBang/Eclipse integration plugin and its jdt.ls extension\n```bash\n$ npm run build-ext\n```\n\nThis script places the built jars in `jbang-vscode/jars/`.  \n\n**Step 6.** Build the VS Code extension\n```bash\n$ npx vsce package\n```\nThis will generate a `jbang-vscode-\u003cversion\u003e.vsix` file in the `jbang-vscode/` directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbangdev%2Fjbang-vscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbangdev%2Fjbang-vscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbangdev%2Fjbang-vscode/lists"}