Changed java root dir markers

This commit is contained in:
2025-05-27 14:11:55 +03:00
parent 3bae42049a
commit bed52665a3

View File

@@ -3,7 +3,15 @@ return {
ft = { 'java' },
opts = {
cmd = { 'jdtls' },
root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw', 'pom.xml' }, { upward = true })[1]),
root_dir = vim.fs.dirname(vim.fs.find({
'.git',
'build.gradle',
'build.gradle.kts',
'build.xml',
'pom.xml',
'settings.gradle',
'settings.gradle.kts',
}, { upward = true })[1]),
},
config = function(_, opts)
require('jdtls').start_or_attach(opts)