question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add VS code extensions preferences in workspace configuration

See original GitHub issue

Description

For example it should be possible to override the default JDT LS vmargs to match the sidecar container memory settings. Today that’s not possible and we have 2 workarounds that are not really satisfactory:

  • use a sidecar with > 1.5GB (may be too much for che.openshift.io)
  • start the workspace and edit the JTD LS vmargs from Theia settings (but the UX is awful)

That same problem will exist for any VS Code plugin that has some defaults that may not work well when they run in a container.

Here is a proposal to include that in a devfile and workspace.config:

  - name: java support
    type: chePlugin
    id: 'org.eclipse.che.vscode-redhat.java:0.38.0'
    preferences:
       java.jdt.ls.vmargs: '-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication'
       java.home: '/home/user/jdk11'

devfile

and in json config

"attributes": {
  "plugin.org.eclipse.che.vscode-redhat.java.java.jdt.ls.vmargs": "-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication",
  "plugin.org.eclipse.che.vscode-redhat.java.java.home": "/home/user/jdk11"
...
}

workspace config

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
azatsarynnyycommented, Mar 27, 2019

Also, that Theia extension should take into account that not all of the Che Workspace attributes are the settings for Theia. The extension should be able to distinguish it. Such attributes can be prefixed with preference, e.g.:

"attributes": {
  "plugin.org.eclipse.che.vscode-redhat.java.preference.java.jdt.ls.vmargs": "-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication",
  "plugin.org.eclipse.che.vscode-redhat.java.preference.java.home": "/home/user/jdk11"
...
}
0reactions
benoitfcommented, Mar 27, 2019

@tsmaeder : well I would say it’s because workpace config is only allowing attributes in the current model.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User and Workspace Settings - Visual Studio Code
In general, VS Code extensions store their settings in your user or workspaces settings files and they are available through the Settings editor...
Read more >
Customise VS Code for a project, or per language - Rob O'Leary
You can open the Settings UI with the keyboard shortcut ( Ctrl+, ), or by running the Preferences: Open Settings (UI) command. ......
Read more >
VS Code Extension to Update Workspace Settings
import { ConfigurationTarget, workspace } from 'vscode'; const configuration = workspace.getConfiguration(<YOUR_SECTION>) ...
Read more >
User and Workspace Settings - vscode-docs
The menu under File , Preferences provides entries to configure user and workspace settings. You are provided with a list of default settings....
Read more >
Required extensions in workspace settings #6178
json of my workspace. These extensions should be automatically installed when a project is opened the first time or a warning message should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found