Skip to content

feat: support project-specific additional parameters #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 9, 2024

Conversation

bastiandoetsch
Copy link
Contributor

@bastiandoetsch bastiandoetsch commented Dec 9, 2024

Description

  • allow setting project-specific additional parameters

Checklist

  • Tests added and all succeed
  • Linted
  • CHANGELOG.md updated
  • README.md updated, if user-facing

Screenshots / GIFs

image

@bastiandoetsch bastiandoetsch requested a review from a team as a code owner December 9, 2024 11:14
@bastiandoetsch bastiandoetsch enabled auto-merge (squash) December 9, 2024 11:41
@@ -13,8 +13,8 @@
import io.snyk.languageserver.LsRuntimeEnvironment;

public class Preferences {
static Preferences CURRENT_PREFERENCES;
static LsRuntimeEnvironment LS_RUNTIME_ENV = new LsRuntimeEnvironment();
public static Preferences CURRENT_PREFERENCES;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double check why we need this as public

return param;
}

// returns null if nothing found
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete comment

public void addFolderConfig(FolderConfig folderConfig) {
instancePreferences.put(folderConfig.getFolderPath(), gson.toJson(folderConfig));
try {
instancePreferences.flush();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use persist here

}

public void addFolderConfig(FolderConfig folderConfig) {
instancePreferences.put(folderConfig.getFolderPath(), gson.toJson(folderConfig));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip serialization


public void addAll(List<FolderConfig> folderConfigs) {
for (FolderConfig folderConfig : folderConfigs) {
addFolderConfig(folderConfig);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick this will call persist for every entry. maybe we can batch them

@bastiandoetsch bastiandoetsch merged commit f03f218 into main Dec 9, 2024
7 checks passed
@bastiandoetsch bastiandoetsch deleted the feat/IDE-819_add-project-specific-settings branch December 9, 2024 14:49
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.

2 participants