Skip to content

fix: update mason API usage for nvim-java compatibility #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: use stdpath instead of for consistent mason path resolution
  • Loading branch information
Kabil777 committed May 12, 2025
commit e67b8a1ef9b5495317c6530652825fae5a2ecc7b
5 changes: 3 additions & 2 deletions lua/java-core/ls/servers/jdtls/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ function M.get_config(opts)
local jdk = mason_reg.get_package('openjdk-17')

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

base_config.cmd_env = {
Expand Down