Repository navigation
Closed
Description
- Basic information.
I am using mise to manage dev tools and env vars.
For example, it is using [email protected] in folder/e/documents/temp/lsp4ijand but [email protected] in folder/e/documents/temp/lsp4ij/useEnv.
david@lywPc /e/documents/temp/lsp4ij
$ mise ls -c
Tool Version Source Requested
go 1.26.3 (symlink) C:\Users\david\.config\mise\config.toml 1.26
java 21 (symlink) C:\Users\david\.config\mise\config.toml 21
node 24.19.0 C:\Users\david\.config\mise\config.toml 24.19.0
npm:@colbymchenry/codegraph 1.5.0 C:\Users\david\.config\mise\config.toml 1.5.0
npm:@dbx-app/mcp-server 0.4.62 C:\Users\david\.config\mise\config.toml 0.4.62
npm:@deepseek-ai/dsh 0.1.0-rc.7 C:\Users\david\.config\mise\config.toml 0.1.0-rc.7
npm:@vue/language-server 2.2.8 C:\Users\david\.config\mise\config.toml 2.2.8
npm:bash-language-server 5.6.0 C:\Users\david\.config\mise\config.toml 5.6.0
npm:stylelint-lsp 2.0.1 C:\Users\david\.config\mise\config.toml 2.0.1
npm:typescript 5.6.3 C:\Users\david\.config\mise\config.toml 5.6.3
npm:typescript-language-server 5.3.0 C:\Users\david\.config\mise\config.toml 5.3.0
python 3 (symlink) C:\Users\david\.config\mise\config.toml 3
david@lywPc /e/documents/temp/lsp4ij
$ node -v
v24.19.0
david@lywPc /e/documents/temp/lsp4ij
$ cd useEnv/
david@lywPc /e/documents/temp/lsp4ij/useEnv
$ mise ls -c
Tool Version Source Requested
go 1.26.3 (symlink) C:\Users\david\.config\mise\config.toml 1.26
java 21 (symlink) C:\Users\david\.config\mise\config.toml 21
node 16.20.2 E:\documents\temp\lsp4ij\useEnv\mise.toml 16.20.2
npm:@colbymchenry/codegraph 1.5.0 C:\Users\david\.config\mise\config.toml 1.5.0
npm:@dbx-app/mcp-server 0.4.62 C:\Users\david\.config\mise\config.toml 0.4.62
npm:@deepseek-ai/dsh 0.1.0-rc.7 C:\Users\david\.config\mise\config.toml 0.1.0-rc.7
npm:@vue/language-server 2.2.8 C:\Users\david\.config\mise\config.toml 2.2.8
npm:bash-language-server 5.6.0 C:\Users\david\.config\mise\config.toml 5.6.0
npm:stylelint-lsp 2.0.1 C:\Users\david\.config\mise\config.toml 2.0.1
npm:typescript 5.6.3 C:\Users\david\.config\mise\config.toml 5.6.3
npm:typescript-language-server 5.3.0 C:\Users\david\.config\mise\config.toml 5.3.0
python 3 (symlink) C:\Users\david\.config\mise\config.toml 3
david@lywPc /e/documents/temp/lsp4ij/useEnv
$ node -v
v16.20.2
david@lywPc /e/documents/temp/lsp4ij/useEnv
$ ll
total 3.0K
-rw-r--r-- 1 david david 25 Sep 2 21:22 mise.toml
-rw-r--r-- 1 david david 250 Sep 2 21:26 package.json
-rw-r--r-- 1 david david 78 Sep 2 21:31 test.js
david@lywPc /e/documents/temp/lsp4ij/useEnv
$
/e/documents/temp/lsp4ij/useEnv/package.json
{
"name": "useenv",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"nodeVersion": "node -v"
},
"keywords": [],
"author": "",
"license": "ISC"
}/e/documents/temp/lsp4ij/useEnv/test.js
console.log("enter test.js");
console.log(`node version: ${process.version}`);- Npm Run/Debug Configuration is using env vars ( [email protected] e.g.) under folder
useEnv.
Create Run/Debug ConfigurationuseEnvas below and run it.
You can see it is using env vars ( [email protected] e.g.) under folder `useEnv`.
- But DAP is using [email protected], not the env vars under folder
useEnv.

Metadata
Metadata
Assignees
Labels
No labels
Activity
angelozerr commentedon Sep 2, 2026
PassingByThs commentedon Sep 2, 2026
What I mean is to use the environment variables associated with the specific folder (which can be managed using
mise), similar to how other run configurations in IntelliJ IDEA are set up, rather than manually configuring them separately.angelozerr commentedon Oct 10, 2026
@sohamsakhare76-ai are you interested to work on this issue?
sohamsakhare76-ai commentedon Oct 10, 2026
Hi Angelo! We are together again...Yes, I'd be happy to work on this issue. I'll investigate how directory environment variables are currently handled in LSP and DAP configurations and explore a possible solution. Thanks for reaching out!
sohamsakhare76-ai commentedon Oct 10, 2026
Hi Angelo! I've traced the LSP and DAP process-launching paths. Both currently configure system/user-defined environment variables and set the working directory separately.
Before implementing the fix, could you clarify whether you expect us to reuse an IntelliJ Platform API for resolving directory-specific environments, or whether the solution should explicitly support tools such as mise? I'd like to keep the implementation consistent with LSP4IJ's architecture.
PassingByThs commentedon Oct 10, 2026
It doesn't necessarily require supporting specific tools like "mise," and in fact, there are many similar tools that does what mise do. I believe that simply supporting the use of environment variables bound to directories is sufficient, which in turn supports tools like "mise."
sohamsakhare76-ai commentedon Oct 10, 2026
Hey, I've investigated the environment-customization API and tested its availability against LSP4IJ's current IntelliJ Platform dependencies. CommandLineEnvCustomizer isn't available in our current 2024.2 compile target.
It looks like we need to clarify the compatibility requirement before implementing the fix. Would you prefer to preserve support for IntelliJ 2024.2, or would conditional support for the newer environment-customization API be acceptable?
I'd like to ensure the solution supports directory-specific environments generically, without introducing a dependency on Mise or breaking existing IDE compatibility.
PassingByThs commentedon Oct 10, 2026
I have always been using the latest version of IntelliJ IDEA, and currently I am using IntelliJ IDEA 2026.2.3. I do not require compatibility with older versions of IntelliJ IDEA.
sohamsakhare76-ai commentedon Oct 10, 2026
Thanks for clarifying! Since the directory-environment customization API isn't available in LSP4IJ's current 2024.2 target, would you be open to raising the minimum supported IntelliJ Platform version to 2026.1 to use the newer API? I'd like to confirm this before changing the build configuration.
PassingByThs commentedon Oct 10, 2026
I am not a plugin developer; I am simply using IntelliJ IDEA 2026.2.3, so this does not involve the minimum supported version of the IntelliJ Platform.
sohamsakhare76-ai commentedon Oct 10, 2026
Thanks for clarifying! Just to clarify, my question about raising the minimum supported IntelliJ Platform version was directed to Angelo/the LSP4IJ maintainers, since I understand that this is a project-level compatibility decision rather than something the issue reporter would decide.
I’ll continue investigating the API and the implementation in the meantime.
angelozerr commentedon Oct 10, 2026
@sohamsakhare76-ai let me explain shortly the LSP4IJ history.
In 2019, https://github.com/redhat-developer/intellij-quarkus has been created and as it didn't exist LSP support for JetBrains, LSP support was implemented.
In 2022, maintainers of https://github.com/redhat-developer/intellij-quarkus had no time to maintain it and I was assigned to work on it. I decided to extract this LSP support in a new project LSP4IJ because I was sure that other plugins need LSP support. LSP4IJ was bad (a lot of performance problem , a lot of bugs), but after 1 year of hard work, LSP4IJ started to work correctly.
I am the only author/maintainer of LSP4IJ and as we need DAP support in https://github.com/redhat-developer/intellij-quarkus (to support Qute debugger), I decided to provide DAP support in LSP4IJ.
There are a lot of plugins which are based on LSP4IJ https://github.com/redhat-developer/lsp4ij/tree/main#who-is-using-lsp4ij so we cannot change the minimal version as we wish. We need to speak about that in discussion like I did with release #1646 (by adding authors of plugin).
I have tried to cover 1 year compability. Today I don't use some 2025 or 2026 API, it is the reason why it is compatbible with 2024.
In other words, it is really annoying to switch to 2026 just for a minor feature.
Anyway thanks so much to investigate this issue.
sohamsakhare76-ai commentedon Oct 10, 2026
Hi Angelo,
I've investigated the LSP and DAP launch paths and the IntelliJ Platform 2024.2 APIs.
Currently, both paths use the IDE's environment map, and setting a working directory alone doesn't resolve directory-specific environment variables.
I haven't found a suitable public API in the 2024.2 sources for retrieving the environment associated with an arbitrary directory. Shell-based solutions also depend on how directory-specific environment tools integrate with the shell.
Would you prefer us to implement a shared shell-based environment resolver, or is there an existing IntelliJ API or integration you recommend using while preserving compatibility with 2024.2?
I'd like to keep the implementation generic rather than hard-code support for
mise.angelozerr commentedon Oct 10, 2026
@sohamsakhare76-ai I know it is not a clean solution (but we do that sometimes to cover all IJ version), what about using CommandLineEnvCustomizer with Java Reflection?
It will work with 2026 and not with 2024 (but it is not a problem)