diff options
Diffstat (limited to '.config/nvim/lua/cfg/utils')
-rw-r--r-- | .config/nvim/lua/cfg/utils/init.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/nvim/lua/cfg/utils/init.lua b/.config/nvim/lua/cfg/utils/init.lua index 2fe3331..4c5dfd2 100644 --- a/.config/nvim/lua/cfg/utils/init.lua +++ b/.config/nvim/lua/cfg/utils/init.lua @@ -8,6 +8,16 @@ function utils.reload_config() vim.cmd ":PackerInstall" end +function utils.check_lsp_client_active(name) + local clients = vim.lsp.get_active_clients() + for _, client in pairs(clients) do + if client.name == name then + return true + end + end + return false +end + function utils.define_augroups(definitions) -- {{{1 -- Create autocommand groups based on the passed definitions -- |