We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b18e94 commit 86487cdCopy full SHA for 86487cd
1 file changed
lua/peter/util/diagnostic.lua
@@ -33,12 +33,12 @@ function M.prev(opts)
33
return M.jump(H.jump_opts(-vim.v.count1, opts))
34
end
35
36
----Get diagnostics for current line.
+---Get diagnostics for the current line in the current buffer (in the current
37
+---window).
38
---@return vim.Diagnostic[]
-function M.current_line()
39
- local bufnr = vim.api.nvim_get_current_buf()
+function M.line_diagnostics()
40
local line = vim.api.nvim_win_get_cursor(0)[1] - 1
41
- return vim.diagnostic.get(bufnr, { lnum = line })
+ return vim.diagnostic.get(0, { lnum = line })
42
43
44
--[[ ---------------------------------------------------------------------- ]]
0 commit comments