From 25b8c889ee5caa288d2250c50cecefa41d80c028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20F=2E=20Bortl=C3=ADk?= Date: Wed, 11 Dec 2024 17:08:03 +0100 Subject: [PATCH 1/7] docs: replace packer with pckr.nvim Packer is unmaintained. --- README.md | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 34d86319..01008836 100644 --- a/README.md +++ b/README.md @@ -52,28 +52,24 @@ return { } ``` -And with Packer: +And with pckr.nvim: ```lua - use { - "harrisoncramer/gitlab.nvim", - requires = { - "MunifTanjim/nui.nvim", - "nvim-lua/plenary.nvim", - "sindrets/diffview.nvim" - "stevearc/dressing.nvim", -- Recommended but not required. Better UI for pickers. - "nvim-tree/nvim-web-devicons", -- Recommended but not required. Icons in discussion tree. - }, - build = function() - require("gitlab.server").build() - end, - branch = "develop", - config = function() - require("diffview") -- We require some global state from diffview - local gitlab = require("gitlab") - gitlab.setup() - end, - } +{ + "harrisoncramer/gitlab.nvim", + requires = { + "MunifTanjim/nui.nvim", + "nvim-lua/plenary.nvim", + "sindrets/diffview.nvim", + "stevearc/dressing.nvim", -- Recommended but not required. Better UI for pickers. + "nvim-tree/nvim-web-devicons", -- Recommended but not required. Icons in discussion tree. + }, + run = function() require("gitlab.server").build() end, -- Builds the Go binary + config = function() + require("diffview") -- We require some global state from diffview + require("gitlab").setup() + end, +} ``` ## Connecting to Gitlab From d4180a1d889b65a01b278ba3885d7369e5e71d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20F=2E=20Bortl=C3=ADk?= Date: Wed, 11 Dec 2024 17:09:01 +0100 Subject: [PATCH 2/7] docs: simplify lazy.nvim example config --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 01008836..36319ab8 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ For more detailed information about the Lua APIs please run `:h gitlab.nvim.api` With Lazy: ```lua -return { +{ "harrisoncramer/gitlab.nvim", dependencies = { "MunifTanjim/nui.nvim", @@ -44,7 +44,6 @@ return { "stevearc/dressing.nvim", -- Recommended but not required. Better UI for pickers. "nvim-tree/nvim-web-devicons" -- Recommended but not required. Icons in discussion tree. }, - enabled = true, build = function () require("gitlab.server").build(true) end, -- Builds the Go binary config = function() require("gitlab").setup() From cf19c01e5f0b83d0834786599b7de64492db354c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20F=2E=20Bortl=C3=ADk?= Date: Wed, 11 Dec 2024 17:09:53 +0100 Subject: [PATCH 3/7] docs: add note about using develop The `develop` branch was before part of the Packer config without any explanation. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 36319ab8..28139074 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,8 @@ And with pckr.nvim: } ``` +Add `branch = "develop",` to your configuration if you want to use the (possibly unstable) development version of `gitlab.nvim`. + ## Connecting to Gitlab This plugin requires an auth token to connect to Gitlab. The token can be set in the root directory of the project in a `.gitlab.nvim` environment file, or can be set via a shell environment variable called `GITLAB_TOKEN` instead. If both are present, the `.gitlab.nvim` file will take precedence. From 68615309aeac9fe2644cd803b19204b74ed19461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20F=2E=20Bortl=C3=ADk?= Date: Wed, 11 Dec 2024 17:10:46 +0100 Subject: [PATCH 4/7] docs: move reference to CONTRIBUTING.md up --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 28139074..68eadece 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,10 @@ And with pckr.nvim: Add `branch = "develop",` to your configuration if you want to use the (possibly unstable) development version of `gitlab.nvim`. +## Contributing + +Contributions to the plugin are welcome. Please read [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) before you start working on a pull request. + ## Connecting to Gitlab This plugin requires an auth token to connect to Gitlab. The token can be set in the root directory of the project in a `.gitlab.nvim` environment file, or can be set via a shell environment variable called `GITLAB_TOKEN` instead. If both are present, the `.gitlab.nvim` file will take precedence. @@ -118,7 +122,3 @@ For a list of all these settings please run `:h gitlab.nvim.configuring-the-plug The plugin sets up a number of useful keybindings in the special buffers it creates, and some global keybindings as well. Refer to the relevant section of the manual `:h gitlab.nvim.keybindings` for more details. For more information about each of these commands, and about the APIs in general, run `:h gitlab.nvim.api` - -## Contributing - -Contributions to the plugin are welcome. Please read [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) before you start working on a pull request. From 100add84aa7fa3d21e6347ad6b59a1d9289aff2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20F=2E=20Bortl=C3=ADk?= Date: Wed, 11 Dec 2024 17:11:11 +0100 Subject: [PATCH 5/7] docs: add note about branching off of develop --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 98d3c074..d220b816 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -6,7 +6,7 @@ Thank you for taking time to contribute to this plugin! Please follow these step It's possible that the feature you want is already implemented, or does not belong in `gitlab.nvim` at all. By creating an issue first you can have a conversation with the maintainers about the functionality first. While this is not strictly necessary, it greatly increases the likelihood that your merge request will be accepted. -2. Fork the repository, and create a new feature branch for your desired functionality. Make your changes. +2. Fork the repository, and create a new feature branch off the `develop` branch for your desired functionality. Make your changes. If you are using Lazy as a plugin manager, the easiest way to work on changes is by setting a specific path for the plugin that points to your repository locally. This is what I do: From 508f117953373e4d178ce85a93ffa74d421a0ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20F=2E=20Bortl=C3=ADk?= Date: Wed, 11 Dec 2024 17:15:01 +0100 Subject: [PATCH 6/7] docs: update installation examples in gitlab.nvim.txt --- doc/gitlab.nvim.txt | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/doc/gitlab.nvim.txt b/doc/gitlab.nvim.txt index c9dd0dff..cdb6679a 100644 --- a/doc/gitlab.nvim.txt +++ b/doc/gitlab.nvim.txt @@ -59,25 +59,24 @@ INSTALLATION *gitlab.nvim.installation* With Lazy: >lua - return { + { "harrisoncramer/gitlab.nvim", dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", "sindrets/diffview.nvim", "stevearc/dressing.nvim", -- Recommended but not required. Better UI for pickers. - "nvim-tree/nvim-web-devicons" -- Recommended but not required. Icons in discussion tree. + "nvim-tree/nvim-web-devicons", -- Recommended but not required. Icons in discussion tree. }, - enabled = true, build = function () require("gitlab.server").build(true) end, -- Builds the Go binary config = function() require("gitlab").setup() end, } < -And with Packer: +And with pckr.nvim: >lua - use { + { "harrisoncramer/gitlab.nvim", requires = { "MunifTanjim/nui.nvim", @@ -86,14 +85,10 @@ And with Packer: "stevearc/dressing.nvim", -- Recommended but not required. Better UI for pickers. "nvim-tree/nvim-web-devicons", -- Recommended but not required. Icons in discussion tree. }, - build = function() - require("gitlab.server").build() - end, - branch = "develop", + run = function() require("gitlab.server").build() end, -- Builds the Go binary config = function() require("diffview") -- We require some global state from diffview - local gitlab = require("gitlab") - gitlab.setup() + require("gitlab").setup() end, } < From dd260d94f69aaa4f0b80d79b90925c1f005d0db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20F=2E=20Bortl=C3=ADk?= Date: Wed, 11 Dec 2024 17:18:33 +0100 Subject: [PATCH 7/7] docs: add missing commas and remove extra spaces --- README.md | 2 +- doc/gitlab.nvim.txt | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 68eadece..1b6841af 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ With Lazy: "nvim-lua/plenary.nvim", "sindrets/diffview.nvim", "stevearc/dressing.nvim", -- Recommended but not required. Better UI for pickers. - "nvim-tree/nvim-web-devicons" -- Recommended but not required. Icons in discussion tree. + "nvim-tree/nvim-web-devicons", -- Recommended but not required. Icons in discussion tree. }, build = function () require("gitlab.server").build(true) end, -- Builds the Go binary config = function() diff --git a/doc/gitlab.nvim.txt b/doc/gitlab.nvim.txt index cdb6679a..bfeb4332 100644 --- a/doc/gitlab.nvim.txt +++ b/doc/gitlab.nvim.txt @@ -195,7 +195,7 @@ you call this function with no values the defaults will be used: next_field = "", -- Cycle to the next field. Accepts |count|. prev_field = "", -- Cycle to the previous field. Accepts |count|. perform_action = "ZZ", -- Once in normal mode, does action (like saving comment or applying description edit, etc) - perform_linewise_action = "ZA", -- Once in normal mode, does the linewise action (see logs for this job, etc) + perform_linewise_action, = "ZA", -- Once in normal mode, does the linewise action (see logs for this job, etc) discard_changes = "ZQ", -- Quit the popup discarding changes, the popup content is not saved to the `temp_registers` (see `:h gitlab.nvim.temp-registers`) }, discussion_tree = { @@ -249,14 +249,14 @@ you call this function with no values the defaults will be used: discussion_tree = { -- The discussion tree that holds all comments expanders = { -- Discussion tree icons expanded = " ", -- Icon for expanded discussion thread - collapsed = " ", -- Icon for collapsed discussion thread + collapsed = " ", -- Icon for collapsed discussion thread indentation = " ", -- Indentation Icon }, spinner_chars = { "/", "|", "\\", "-" }, -- Characters for the refresh animation auto_open = true, -- Automatically open when the reviewer is opened - default_view = "discussions" -- Show "discussions" or "notes" by default + default_view = "discussions", -- Show "discussions" or "notes" by default blacklist = {}, -- List of usernames to remove from tree (bots, CI, etc) - sort_by = "latest_reply" -- Sort discussion tree by the "latest_reply", or by "original_comment", see `:h gitlab.nvim.toggle_sort_method` + sort_by = "latest_reply", -- Sort discussion tree by the "latest_reply", or by "original_comment", see `:h gitlab.nvim.toggle_sort_method` keep_current_open = false, -- If true, current discussion stays open even if it should otherwise be closed when toggling position = "bottom", -- "top", "right", "bottom" or "left" size = "20%", -- Size of split @@ -267,7 +267,7 @@ you call this function with no values the defaults will be used: draft = "✎", -- Symbol to show next to draft comments/notes tree_type = "simple", -- Type of discussion tree - "simple" means just list of discussions, "by_file_name" means file tree with discussions under file draft_mode = false, -- Whether comments are posted as drafts as part of a review - winbar = nil -- Custom function to return winbar title, should return a string. Provided with WinbarTable (defined in annotations.lua) + winbar = nil, -- Custom function to return winbar title, should return a string. Provided with WinbarTable (defined in annotations.lua) -- If using lualine, please add "gitlab" to disabled file types, otherwise you will not see the winbar. }, emojis = { @@ -334,7 +334,7 @@ you call this function with no values the defaults will be used: squash = false, -- Whether the commits will be marked for squashing fork = { enabled = false, -- If making an MR from a fork - forked_project_id = nil -- The ID of the project you are merging into. If nil, will be prompted. + forked_project_id = nil, -- The ID of the project you are merging into. If nil, will be prompted. }, title_input = { -- Default settings for MR title input window width = 40,