Skip to content

Commit

Permalink
refactor: remove deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dundargoc committed Dec 5, 2021
1 parent 24f9463 commit 58f0b73
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions runtime/lua/vim/lsp/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -673,26 +673,6 @@ function M.disable(bufnr, client_id)
return vim.diagnostic.disable(bufnr, namespace)
end

--- Enable diagnostics for the given buffer and client
---
---@deprecated Prefer |vim.diagnostic.enable()|
---
---@param bufnr (optional, number): Buffer handle, defaults to current
---@param client_id (optional, number): Enable diagnostics for the given
--- client. The default is to enable diagnostics for all attached
--- clients.
function M.enable(bufnr, client_id)
if not client_id then
return vim.lsp.for_each_buffer_client(bufnr, function(client)
M.enable(bufnr, client.id)
end)
end

bufnr = get_bufnr(bufnr)
local namespace = M.get_namespace(client_id)
return vim.diagnostic.enable(bufnr, namespace)
end

-- }}}

return M

0 comments on commit 58f0b73

Please sign in to comment.