Skip to content

JDTLS "java.cleanup.actions" setting not working #37

@lukejans

Description

@lukejans

I've been configuring this extension based on the redhat-developer/vscode-java extension options and have noticed that some of the settings don't do anything. I'm not sure If this is a bug, there is no support for these options, or I'm doing something wrong (this is likely the case). Below Is my configuration file in zed where I attempt to use the clean up options that are supported by JDTLS.

{
  "languages": {
    "Java": {
      "formatter": "language_server",
      "code_actions_on_format": {
        "source.organizeImports": true,
        "quickfix": true,
        "refactor": true
      }
    }
  },

  "lsp": {
    "java": {
      "settings": {
        "java.jdt.ls.lombokSupport.enabled": true,
        "java.format.enabled": true,
        "java.saveActions.cleanup": true,
        "java.cleanup.actions": [
          "organizeImports",
          "qualifyMembers",
          "qualifyStaticMembers",
          "addOverride",
          "addDeprecated",
          "stringConcatToTextBlock",
          "invertEquals",
          "addFinalModifier",
          "instanceofPatternMatch",
          "lambdaExpressionFromAnonymousClass",
          "switchExpression",
          "tryWithResource",
          "lambdaExpression",
          "renameUnusedLocalVariables",
          "useSwitchForInstanceofPattern"
        ]
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions