diff --git a/README.md b/README.md index 3525f250f..309e46a0c 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,7 @@ local neogit = require("neogit") neogit.setup { disable_signs = false, + disable_hint = false, disable_context_highlighting = false, disable_commit_confirmation = false, auto_refresh = true, @@ -203,6 +204,9 @@ You can override them to fit your colorscheme by creating a `syntax/NeogitStatus Set `disable_context_highlighting = true` in your call to [`setup`](#configuration) to disable context highlighting altogether. +## Disabling Hint +Set `disable_hint = true` in your call to [`setup`](#configuration) to hide hints on top of the panel. + ## Disabling Commit Confirmation Set `disable_commit_confirmation = true` in your call to [`setup`](#configuration) to disable the "Are you sure you want to commit?" prompt after saving the commit message buffer. diff --git a/lua/neogit/config.lua b/lua/neogit/config.lua index 49e71f5f8..977e86978 100644 --- a/lua/neogit/config.lua +++ b/lua/neogit/config.lua @@ -1,6 +1,7 @@ local M = {} M.values = { + disable_hint = false, disable_context_highlighting = false, disable_signs = false, disable_commit_confirmation = false, diff --git a/lua/neogit/status.lua b/lua/neogit/status.lua index 852613348..de3d031a1 100644 --- a/lua/neogit/status.lua +++ b/lua/neogit/status.lua @@ -112,6 +112,10 @@ local function draw_buffer() M.status_buffer:clear_sign_group('fold_markers') local output = LineBuffer.new() + if not config.values.disable_hint then + output:append("Hint: [] toggle diff | [s]tage | [u]nstage | [x] discard | [c]ommit | [?] more help") + output:append("") + end output:append(string.format("Head: %s %s", M.repo.head.branch, M.repo.head.commit_message or '(no commits)')) if M.repo.upstream.branch then output:append(string.format("Push: %s %s", M.repo.upstream.branch, M.repo.upstream.commit_message or '(no commits)'))