@@ -5,7 +5,7 @@ local mason_reg = require('mason-registry')
55local path = require (' java-core.utils.path' )
66local plugins = require (' java-core.ls.servers.jdtls.plugins' )
77local util = require (' lspconfig.util' )
8- local workspace = require (' java-core.ls.servers.jdtls.workspace ' )
8+ local utils = require (' java-core.ls.servers.jdtls.utils ' )
99
1010local M = {}
1111
@@ -33,8 +33,6 @@ function M.get_config(opts)
3333 local equinox_launcher =
3434 path .join (jdtls_root , ' plugins' , ' org.eclipse.equinox.launcher.jar' )
3535 local plugin_paths = plugins .get_plugin_paths (opts .jdtls_plugins )
36- local jdtls_cache_path = path .join (vim .fn .stdpath (' cache' ), ' jdtls' )
37-
3836 local base_config = config .get_config ()
3937
4038 base_config .cmd = {
@@ -61,10 +59,10 @@ function M.get_config(opts)
6159 equinox_launcher ,
6260
6361 ' -configuration' ,
64- jdtls_cache_path ,
62+ utils . get_jdtls_config_path () ,
6563
6664 ' -data' ,
67- workspace . get_default_workspace (),
65+ utils . get_workspace_path (),
6866 }
6967
7068 if opts .use_mason_jdk then
@@ -84,7 +82,7 @@ function M.get_config(opts)
8482
8583 base_config .root_dir = M .get_root_finder (opts .root_markers )
8684 base_config .init_options .bundles = plugin_paths
87- base_config .init_options .workspace = workspace . get_default_workspace ()
85+ base_config .init_options .workspace = utils . get_workspace_path ()
8886
8987 log .debug (' generated jdtls setup config: ' , base_config )
9088
0 commit comments