fix(lsp): adjust legacy show diagnostic functions to use correct scope (#16106)

* `where` was renamed to `scope`
This commit is contained in:
Mathias Fußenegger 2021-10-20 17:27:55 +02:00 committed by GitHub
parent f421718d8d
commit dc6c9fe442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -552,7 +552,7 @@ end
---@return table {popup_bufnr, win_id} ---@return table {popup_bufnr, win_id}
function M.show_position_diagnostics(opts, buf_nr, position) function M.show_position_diagnostics(opts, buf_nr, position)
opts = opts or {} opts = opts or {}
opts.where = "cursor" opts.scope = "cursor"
opts.pos = position opts.pos = position
if opts.severity then if opts.severity then
opts.severity = severity_lsp_to_vim(opts.severity) opts.severity = severity_lsp_to_vim(opts.severity)
@ -575,7 +575,7 @@ end
---@return table {popup_bufnr, win_id} ---@return table {popup_bufnr, win_id}
function M.show_line_diagnostics(opts, buf_nr, line_nr, client_id) function M.show_line_diagnostics(opts, buf_nr, line_nr, client_id)
opts = opts or {} opts = opts or {}
opts.where = "line" opts.scope = "line"
opts.pos = line_nr opts.pos = line_nr
if client_id then if client_id then
opts.namespace = M.get_namespace(client_id) opts.namespace = M.get_namespace(client_id)