Skip to content

Configuration and its documentation should be simple and consistent #99

@playdohface

Description

@playdohface

My current configuration for using Java in Zed looks something like this:

"lsp" : { 
"jdtls": {
      "settings": {
        "java": {
          "home": "/Users/kalle/.sdkman/candidates/java/24-tem",
          "jdt": {
            "ls": {
              "lombokSupport": {
                "enabled": true
              }
            }
          }
        }
      },
"initialization_options": {
        "settings": {
          "java": {
            "project": {
              // if we zed project-root is not the same as the java project root
              // include the java project root here
              "sourcePaths": [] // e.g. ["backend"]
            }
          }
        }
      }
    }
}

It's doing the two most common things one would want to configure about this extension: enable lombok-support and specify a JDK to run the language server on. Incidentally, its also doing the (to my knowledge) only two things that the extension itself actually reads from the config. There is no need for the pyramids of gizeh here.

I think what we should do instead is have the config look more like this:

"lsp" : {
    "jdtls" : {
        "lombok_support" : "true",
        "java_home" : "/path/to/my/jdk"
        "initialization_options" : {/* whatever we actually pass on to jdtls */ }
    }
}

Since we can't auto-migrate (I don't think) we probably want to keep legacy support alive, but update our (and Zeds) documentation, and perhaps include some examples for common configurations for jdtls in the readme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions