This repository has been archived on 2024-10-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2022-11-30 23:29:58 -08:00
|
|
|
;;; jdtls.fnl - nvim-jdtls configuration
|
|
|
|
|
|
|
|
|
|
(import-macros {: hook! : module-call! : module-fn!} :macros)
|
|
|
|
|
|
|
|
|
|
(fn configure []
|
|
|
|
|
(hook! :FileType :java
|
2022-12-02 19:22:59 -08:00
|
|
|
#(let [root-dir (module-call! :jdtls.setup :find_root
|
2022-11-30 23:29:58 -08:00
|
|
|
[ ".git" "mvnw" "gradlew" "build.gradle" ])
|
2022-12-02 19:22:59 -08:00
|
|
|
lsp-cap (module-call! :cmp_nvim_lsp :default_capabilities)]
|
2022-11-30 23:29:58 -08:00
|
|
|
(module-call! :jdtls :start_or_attach
|
2022-12-02 19:22:59 -08:00
|
|
|
{ :capabilities lsp-cap
|
2022-12-02 16:38:31 -08:00
|
|
|
:on_attach (module-fn! :plugin.lsp :on-attach)
|
2022-12-02 19:22:59 -08:00
|
|
|
:root_dir root-dir
|
2022-11-30 23:29:58 -08:00
|
|
|
:cmd [ "jdtls"
|
|
|
|
|
"-data"
|
|
|
|
|
(module-call! :plugin.lsp
|
2022-12-02 16:38:31 -08:00
|
|
|
:get-data-dir
|
2022-12-02 19:22:59 -08:00
|
|
|
:jdtls root-dir) ]}))))
|
2022-11-30 23:29:58 -08:00
|
|
|
|
|
|
|
|
{: configure}
|