From 2943fae3f362e9f2bebba38637540988130735d1 Mon Sep 17 00:00:00 2001 From: "Harrison (Harry) Cramer" <32515581+harrisoncramer@users.noreply.github.com> Date: Sun, 3 Mar 2024 12:06:14 -0500 Subject: [PATCH] fix: Update help docs w/ changes to diagnostic configuration (#208) Fix alert for diagnostic configuration update --- doc/gitlab.nvim.txt | 29 +++++++++++++++++++++-------- lua/gitlab/reviewer/init.lua | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/doc/gitlab.nvim.txt b/doc/gitlab.nvim.txt index 817f080..5d5ecb4 100644 --- a/doc/gitlab.nvim.txt +++ b/doc/gitlab.nvim.txt @@ -205,11 +205,11 @@ you call this function with no values the defaults will be used: }, }, discussion_signs = { - enabled = true, - skip_resolved_discussion = false, - skip_old_revision_discussion = false, - severity = vim.diagnostic.severity.INFO, - virtual_text = false, + enabled = true, -- Show diagnostics for gitlab comments in the reviewer + skip_resolved_discussion = false, -- Show diagnostics for resolved discussions + severity = vim.diagnostic.severity.INFO, -- ERROR, WARN, INFO, or HINT + virtual_text = false, -- Whether to show the comment text inline as floating virtual text + priority = 100, -- Higher will override LSP warnings, etc icons = { comment = "→|", range = " |", @@ -367,9 +367,22 @@ These labels will be visible in the summary panel, as long as you provide the SIGNS AND DIAGNOSTICS *gitlab.nvim.signs-and-diagnostics* -By default when reviewing files you will see diagnostics in the reviewer -for comments that have been added to a review. When the cursor is on -diagnostic line you can view discussion thread by using `vim.diagnostic.show`. +By default when reviewing files, you will see diagnostics for comments that +have been added to a review. These are the default settings: +>lua + discussion_signs = { + enabled = true, -- Show diagnostics for gitlab comments in the reviewer + skip_resolved_discussion = false, -- Show diagnostics for resolved discussions + severity = vim.diagnostic.severity.INFO, -- ERROR, WARN, INFO, or HINT + virtual_text = false, -- Whether to show the comment text inline as floating virtual text + priority = 100, -- Higher will override LSP warnings, etc + icons = { + comment = "→|", + range = " |", + }, + }, + +When the cursor is on diagnostic line you can view discussion thread by using `vim.diagnostic.show()` You can also jump to discussion tree for the given comment: >lua diff --git a/lua/gitlab/reviewer/init.lua b/lua/gitlab/reviewer/init.lua index 8a074fc..32c8602 100644 --- a/lua/gitlab/reviewer/init.lua +++ b/lua/gitlab/reviewer/init.lua @@ -62,7 +62,7 @@ M.open = function() if state.settings.discussion_diagnostic ~= nil or state.settings.discussion_sign ~= nil then u.notify( - "Diagnostics are now configured settings.discussion_signs, see :h gitlab.signs_and_diagnostics", + "Diagnostics are now configured as settings.discussion_signs, see :h gitlab.nvim.signs-and-diagnostics", vim.log.levels.WARN ) end