Skip to content

Commit bb7d586

Browse files
committed
fix: get_client func is failing on older neovim
1 parent 009f3eb commit bb7d586

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/java/startup/exec-order-check.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ function M.is_valid()
2727
}
2828
end
2929

30-
local clients = vim.lsp.get_clients({ name = 'jdtls' })
30+
local clients = vim.lsp.get_clients
31+
and vim.lsp.get_clients({ name = 'jdtls' })
32+
or vim.lsp.get_active_clients({ name = 'jdtls' })
3133

3234
if #clients > 0 then
3335
return {

0 commit comments

Comments
 (0)