Skip to content
This repository was archived by the owner on Nov 30, 2025. It is now read-only.

Commit e67b8a1

Browse files
committed
fix: use stdpath instead of for consistent mason path resolution
1 parent fef288b commit e67b8a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/java-core/ls/servers/jdtls/init.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ function M.get_config(opts)
6969
local jdk = mason_reg.get_package('openjdk-17')
7070

7171
if jdk:is_installed() then
72-
local java_home =
73-
vim.fn.glob(vim.fn.expand('$MASON/packages/openjdk-17/jdk-17*'))
72+
local java_home = vim.fn.glob(
73+
vim.fn.stdpath('data') .. '/mason/packages/openjdk-17/jdk-17*'
74+
)
7475
local java_bin = path.join(java_home, '/bin')
7576

7677
base_config.cmd_env = {

0 commit comments

Comments
 (0)