Skip to content

Add ZED_CUSTOM_JAVA_PACKAGE variable? #193

Description

@jrxpana

There's a nice tip at #177 about creating a debugger config item that makes it easy to run/debug the currently selected file. However this part:

"mainClass": "$ZED_STEM",

really needs to be prefixed with the Java package name in order to be truly generic.

In the list of zed variables there's one called ZED_CUSTOM_RUST_PACKAGE that looks like a Rust version of something that would work. Would it be possible to add something like ZED_CUSTOM_JAVA_PACKAGE for Java? Then we could have something like:

"mainClass": "$ZED_CUSTOM_JAVA_PACKAGE.$ZED_STEM",

Activity

  1. playdohface commented on Feb 17, 2026

    @playdohface
    Collaborator

    Try using ${ZED_CUSTOM_java_package_name:}. This is a little but ugly, but the default is required in case there is no package in scope (otherwise the task will disappear) and the inconsistent casing is legacy (but I think we can fix it now that I am thinking about it)

    EDIT: sorry, I missed that you are talking about debug scenarios not tasks. For that this is another case where, afaik, natively implemented languages (like Rust) can do things that can not be done from extensions (yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions