mirror of
https://github.com/mfussenegger/nvim-jdtls
synced 2024-09-16 14:34:13 +02:00
Use name
param of get_active_clients in request
This commit is contained in:
parent
dbb8a403e9
commit
c4ae99f442
1 changed files with 2 additions and 7 deletions
|
@ -37,13 +37,8 @@ end
|
|||
|
||||
|
||||
local request = function(bufnr, method, params, handler)
|
||||
local client = nil
|
||||
for _, c in pairs(vim.lsp.get_active_clients({ bufnr = bufnr })) do
|
||||
if c.name == 'jdtls' then
|
||||
client = c
|
||||
break
|
||||
end
|
||||
end
|
||||
local clients = vim.lsp.get_active_clients({ bufnr = bufnr, name = "jdtls" })
|
||||
local _, client = next(clients)
|
||||
if not client then
|
||||
vim.notify("No LSP client with name `jdtls` available", vim.log.levels.WARN)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue