This repository has been archived on 2024-10-28. You can view files and clone it, but cannot push or open issues or pull requests.
nvim-config/fnl/plugin/jdtls.fnl

21 lines
922 B
Plaintext
Raw Normal View History

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
#(let [root-dir (module-call! :jdtls.setup :find_root
2022-11-30 23:29:58 -08:00
[ ".git" "mvnw" "gradlew" "build.gradle" ])
lsp-cap (module-call! :cmp_nvim_lsp :default_capabilities)]
2022-11-30 23:29:58 -08:00
(module-call! :jdtls :start_or_attach
{ :capabilities lsp-cap
2022-12-02 16:38:31 -08:00
:on_attach (module-fn! :plugin.lsp :on-attach)
: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
:jdtls root-dir) ]}))))
2022-11-30 23:29:58 -08:00
{: configure}