summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/cfg/utils
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-08 20:17:26 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-08 20:17:26 +0200
commit88616bde7c7b5b25f505997aa2171245f7341453 (patch)
tree7232fff70899952e2f91cb8b5d39c496840105db /.config/nvim/lua/cfg/utils
parent8c0ace95e67f76b900cacd8daa38faa1444cb3b9 (diff)
Updates to lang stuff
Diffstat (limited to '.config/nvim/lua/cfg/utils')
-rw-r--r--.config/nvim/lua/cfg/utils/init.lua10
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
--