Skip to content

feat: add env support to Java profiles#483

Open
0xfraso wants to merge 1 commit intonvim-java:mainfrom
0xfraso:feat/profile-env-support
Open

feat: add env support to Java profiles#483
0xfraso wants to merge 1 commit intonvim-java:mainfrom
0xfraso:feat/profile-env-support

Conversation

@0xfraso
Copy link

@0xfraso 0xfraso commented Mar 14, 2026

Summary

  • add inline environment entries and optional env file support to JavaProfile
  • apply merged profile env to both built-in runner and DAP launches
  • update docs and add tests covering env parsing, path resolution, and DAP profile application

Why

Many Java applications, especially multi-tenant ones, rely on environment-driven
configuration layered into merged application.properties setup. In practice,
that means launch-time env variables are often the most natural source of truth.

I also often share env files with colleagues who use IntelliJ IDEA, where this
workflow is already common. Without this feature, those values had to be
manually converted into VM args or program args for Neovim, which is tedious,
error-prone, and hard to keep aligned across teams.

Profiles are already the place where launch-specific configuration lives, so
extending them to accept env values and env files keeps that workflow intact.
This makes it possible to paste env entries directly or reference an existing
env file as-is instead of translating it into another format.

Behavior

  • profiles can now store VM args, program args, inline env entries, and an env file path
  • relative env file paths resolve from the current project cwd
  • inline env entries override values loaded from the env file
  • invalid env content or unreadable env files fail early with a user-visible error

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant