Skip to content

Commit

Permalink
fix(lsp): use vim.lsp.get_clients
Browse files Browse the repository at this point in the history
Closes #19
  • Loading branch information
rcarriga committed May 22, 2024
1 parent def97d9 commit 6320241
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions lua/nio/curl.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
local process = require("nio.process")

local nio = {}

---@class nio.curl
nio.curl = {}

---@class nio.curl.RequestOpts
---@field method string The HTTP method to use
---@field url string The URL to request
---@field headers table<string, string> The headers to send
---@field body string The body to send

function nio.curl.request(opts) end
2 changes: 1 addition & 1 deletion lua/nio/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end, 6)
---@return nio.lsp.Client[]
function nio.lsp.get_clients(filters)
local clients = {}
for _, client in pairs(vim.lsp.get_active_clients(filters)) do
for _, client in pairs((vim.lsp.get_clients or vim.lsp.get_active_clients)(filters)) do
clients[#clients + 1] = nio.lsp.convert_client(client)
end
return clients
Expand Down

0 comments on commit 6320241

Please sign in to comment.