summary refs log tree commit diff
path: root/.config/nvim/after/ftplugin/oil.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/after/ftplugin/oil.lua')
-rw-r--r--.config/nvim/after/ftplugin/oil.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/.config/nvim/after/ftplugin/oil.lua b/.config/nvim/after/ftplugin/oil.lua
new file mode 100644
index 0000000..4d1c2c4
--- /dev/null
+++ b/.config/nvim/after/ftplugin/oil.lua
@@ -0,0 +1,25 @@
+
+local get_client = function()
+  local active_clients = vim.lsp.get_clients({ name = 'zk' })
+
+  if next(active_clients) == nil then
+    return
+  end
+
+  for _, v in ipairs(active_clients) do
+    if next(v.attached_buffers) ~= nil then
+      print(vim.inspect(v))
+      return v.id
+    end
+  end
+end
+
+local client_id = get_client()
+if client_id == nil then
+  return
+end
+
+local client = vim.lsp.get_client_by_id(client_id)
+print(vim.inspect(client))
+
+print('hi')