plugins.jdtls.settings

Options provided to the require('jdtls').start_or_attach function.

Type: attribute set of anything

Default: { }

Example:

{
  cmd = [
    "jdtls"
    {
      __raw = "'--jvm-arg='..vim.api.nvim_eval('g:NVIM_LOMBOK')";
    }
  ];
  root_dir = {
    __raw = ''
      vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1])
    '';
  };
}

Declared by:

plugins.jdtls.settings.cmd

The command that starts the language server.

Type: null or (list of (string or raw lua code))

Default: null

Example:

[
  "java"
  "-data"
  "/path/to/your/workspace"
  "-configuration"
  "/path/to/your/configuration"
  "-foo"
  "bar"
]

Declared by:

plugins.jdtls.settings.init_options

Language server initializationOptions.

You need to extend the bundles with paths to jar files if you want to use additional eclipse.jdt.ls plugins.

See https://github.com/mfussenegger/nvim-jdtls#java-debug-installation

If you don’t plan on using the debugger or other eclipse.jdt.ls plugins, ignore this option

Type: null or (attribute set)

Default: null

Declared by:

plugins.jdtls.settings.root_dir

Function to identify the root directory from which to run the language server.

Type: null or string or raw lua code

Default: null

Plugin default:

{
  __raw = "require('jdtls.setup').find_root({'.git', 'mvnw', 'gradlew'})";
}

Declared by: