[Refactor]: Remove vim-rooter dependency (#1319)

This commit is contained in:
kylo252 2021-08-17 17:26:59 +02:00 committed by GitHub
parent 335e707b2a
commit 08c0dca307
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 17 deletions

View file

@ -4,12 +4,13 @@ function M.is_client_active(name)
local clients = vim.lsp.get_active_clients()
for _, client in pairs(clients) do
if client.name == name then
return true
return true, client
end
end
return false
end
-- FIXME: this should return a list instead
function M.get_active_client_by_ft(filetype)
if not lvim.lang[filetype] or not lvim.lang[filetype].lsp then
return nil