diff --git a/README.md b/README.md index 1c5ac3b..2b01c33 100644 --- a/README.md +++ b/README.md @@ -333,7 +333,7 @@ Mardkown Preview plugin commands: ##### Neogit -Just run `:Neogit` to launch it, `?` for help, changing parameters is +Just run `:Neogit` (shortcut: `ng`) to launch it, `?` for help, changing parameters is done usually by adding `-` before letter assigned to specific option. ##### Diffview diff --git a/lua/general.lua b/lua/general.lua index ed2020f..0ddd7b3 100644 --- a/lua/general.lua +++ b/lua/general.lua @@ -39,6 +39,8 @@ map("n", "gs", ":Telescope git_status") map("n", "gc", ":Telescope git_commits") map("n", "gb", ":Telescope git_branches") +map("n", "ng", ":Neogit") + -- dap map("n", "db", ":lua require'dap'.toggle_breakpoint()") map("n", "dc", ":lua require'dap'.continue()") diff --git a/lua/lazy-load.lua b/lua/lazy-load.lua index d239ed0..af87fde 100644 --- a/lua/lazy-load.lua +++ b/lua/lazy-load.lua @@ -125,9 +125,8 @@ require("lazy").setup({ -- Only one of these is needed, not both. "nvim-telescope/telescope.nvim", -- optional - "ibhagwan/fzf-lua", -- optional }, - config = true + opts = require('plugins.neogit').config }, { 'Glench/Vim-Jinja2-Syntax', priority = 15 }, diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua new file mode 100644 index 0000000..4a88540 --- /dev/null +++ b/lua/plugins/neogit.lua @@ -0,0 +1,15 @@ +return { + config = { + graph_style = "unicode", + -- Used to generate URL's for branch popup action "pull request". + git_services = { + ["github.com"] = "https://github.com/${owner}/${repository}/compare/${branch_name}?expand=1", + ["bitbucket.org"] = + "https://bitbucket.org/${owner}/${repository}/pull-requests/new?source=${branch_name}&t=1", + ["gitlab.com"] = + "https://gitlab.com/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}", + ["gitlab.inpl.work"] = + "https://gitlab.inpl.work/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}", + }, + } +}