Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Commit 57b644d

Browse files
towrygithub-actions[bot]
authored andcommitted
chore: Auto generate docs
1 parent 19c5f40 commit 57b644d

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

doc/commit-msg-sg.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,31 @@ Your plugin configuration with its default values.
77
Default values:
88
>
99
CommitMsgSg.options = {
10-
---@type string|function
10+
-- Can be string or function that returns cwd.
11+
--@type string|function
1112
cwd = nil,
13+
-- auto attach on gitcommit filetype.
1214
auto_setup_gitcommit = true,
15+
-- auto create user command `WriteGitCommitMessage`.
1316
auto_setup_command = true,
17+
-- callback when AI is started and attached to current buffer. (client, bufnr)
18+
-- You can create your own buffer local commands or keymaps in this callback.
1419
on_attach = nil,
1520
ghost_text = "Thinking...",
16-
-- customized function to generate prompt string.
21+
-- function to generate prompt string.
22+
-- accept a callback that takes input as prompt string.
23+
-- ```lua
24+
-- prompt_gen = function(callback)
25+
-- -- some async operation to generate prompt.
26+
-- local generated_prompt_string = 'The prompt string ...'
27+
-- callback(error_or_nil, generated_prompt_string)
28+
-- end
29+
-- ```
1730
prompt_gen = nil,
31+
-- default prompt string if you do not want to use prompt_gen.
32+
-- default_prompt = [[Some prompt string ... The diff content is: %s]]
33+
-- Note: the staged diff content is generated so you can use it in your prompt to
34+
-- add more context.
1835
default_prompt = nil,
1936
-- @private
2037
executor = "sg",

0 commit comments

Comments
 (0)