Discussion sign and diagnostics (#78)
This MR adds support for in-line comments in the review pane. This allows you to view comments (as diagnostics) directly in the Neovim buffers that you are reviewing. You can then jump to them directly in the discussion tree if you want to reply, edit, and so forth.
This commit is contained in:
@@ -36,6 +36,36 @@ M.init = function()
|
||||
|
||||
M.get_lines = reviewer.get_lines
|
||||
-- Returns the content of the file in the current location in the reviewer window
|
||||
|
||||
M.get_current_file = reviewer.get_current_file
|
||||
-- Get currently loaded file
|
||||
|
||||
M.place_sign = reviewer.place_sign
|
||||
-- Places a sign on the line for currently reviewed file.
|
||||
-- Parameters:
|
||||
-- • {id} The sign id
|
||||
-- • {sign} The sign to place
|
||||
-- • {group} The sign group to place on
|
||||
-- • {new_line} The line to place the sign on
|
||||
-- • {old_line} The buffer number to place the sign on
|
||||
|
||||
M.set_callback_for_file_changed = reviewer.set_callback_for_file_changed
|
||||
-- Call callback whenever the file changes
|
||||
-- Parameters:
|
||||
-- • {callback} The callback to call
|
||||
|
||||
M.set_callback_for_reviewer_leave = reviewer.set_callback_for_reviewer_leave
|
||||
-- Call callback whenever the reviewer is left
|
||||
-- Parameters:
|
||||
-- • {callback} The callback to call
|
||||
|
||||
M.set_diagnostics = reviewer.set_diagnostics
|
||||
-- Set diagnostics for currently reviewed file
|
||||
-- Parameters:
|
||||
-- • {namespace} The namespace for diagnostics
|
||||
-- • {diagnostics} The diagnostics to set
|
||||
-- • {type} "new" if diagnostic should be in file after changes else "old"
|
||||
-- • {opts} see opts in :h vim.diagnostic.set
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user