;;; jdtls.fnl - nvim-jdtls configuration (import-macros {: hook! : module-call! : module-fn!} :macros) (fn configure [] (hook! :FileType :java #(let [root_dir (module-call! :jdtls.setup :find_root [ ".git" "mvnw" "gradlew" "build.gradle" ]) lsp_cap (module-call! :cmp_nvim_lsp :default_capabilities)] (module-call! :jdtls :start_or_attach { :capabilities lsp_cap :on_attach (module-fn! :plugin.lsp :on-attach) :root_dir root_dir :cmd [ "jdtls" "-data" (module-call! :plugin.lsp :get-data-dir :jdtls root_dir) ]})))) {: configure}