From ff4ddfda48bd3144b6f1fc356532e3385bf918a7 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 13 Dec 2023 13:00:15 +0100 Subject: [PATCH] fix: better root finding for jdtls --- ftplugin/java.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ftplugin/java.lua b/ftplugin/java.lua index 6493485..71ed1dd 100644 --- a/ftplugin/java.lua +++ b/ftplugin/java.lua @@ -1,11 +1,12 @@ local nvim_jdtls = require("jdtls") nvim_jdtls.start_or_attach({ cmd = { 'jdtls' }, - root_dir = vim.fs.dirname(vim.fs.find({'.gradlew', '.git', 'mvnw'}, {upward = true})[1]), + root_dir = require('jdtls.setup').find_root({'.git', 'mvnw', 'gradlew'}), }) require('keybinds'):set_lsp_keys({buffer = 0}) -- Allow decompiling classes coming from the language server too +-- TODO should probably move elsewhere vim.api.nvim_create_user_command( 'Javap', function(args)