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:
diff --git a/README.md b/README.md
index 34d86319..1b6841af 100644
--- a/README.md
+++ b/README.md
@@ -35,16 +35,15 @@ 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",
"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()
@@ -52,30 +51,32 @@ 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,
+}
```
+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.
@@ -121,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.
diff --git a/doc/gitlab.nvim.txt b/doc/gitlab.nvim.txt
index c9dd0dff..bfeb4332 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,
}
<
@@ -200,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 = {
@@ -254,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
@@ -272,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 = {
@@ -339,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,