redhat-developer / redhat-developer/vscode-java
Set environment variables for language server
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
As far as I understand this extension launches the process for the language server backend. It could be beneficial to be able to configure the environment variables used when executing the language server, in a similar fashion as in the 'Maven for Java' extension here: https://github.com/Microsoft/vscode-maven/#additional-configurations
My use case is the following:
I am using VS Code with Remote SSH, and trying to work on a Maven based Java project. Currently I am configuring the java.configuration.maven.userSettings setting to point to a project specific Maven settings file. This settings file makes use of an environment variable, which is not set by default on the remote machine shell as it changes from project to project. Therefore the extension imports and tries to build this Maven project, the user settings is used correctly, but the environment variable is not defined.
(Sorry if this suggestion is incorrect, as I am a new user of the extension)
Environment
- Operating System: Linux
- JDK version: 11
- Visual Studio Code version: 1.65.0
- Java extension version: 1.4.0
Steps To Reproduce
- Use VS Code Remote SSH on a machine that does NOT have the environment variable MY_REPO defined by default.
- Create Maven settings file with:
<localRepository>${MY_REPO}/repo</localRepository> - Set
java.configuration.maven.userSettingsto point to the created Maven settings file - Create Maven Java project and let the extension import and build the project
A local folder called "${MY_REPO}" will be created, as the environment variable is not defined.
Current Result
Environment variable used in Maven settings file cannot be configured.
Expected Result
Environment variable used in Maven settings file can be configured.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定源文件或测试。首先跟踪扩展如何启动 language-server 后端,以及 java.configuration.maven.userSettings 如何传递到 Maven;使用 Remote SSH 和 MY_REPO 进行复现,并在配置的环境变量可用于项目导入和构建期间完成工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, typescript
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100