diff --git a/.github/workflows/docgen.yml b/.github/workflows/docgen.yml index bc7aabf..aaf423b 100644 --- a/.github/workflows/docgen.yml +++ b/.github/workflows/docgen.yml @@ -3,13 +3,24 @@ on: push: pull_request: workflow_dispatch: - jobs: docs: runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docs' }} steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Update README with Snippet Permalink + uses: Robitx/snippet-permalink-updater-action@v1 + with: + snippet_file: 'lua/gp/config.lua' + start_marker: 'README_REFERENCE_MARKER_START' + end_marker: 'README_REFERENCE_MARKER_END' + markdown_file: 'README.md' + replace_marker: '' + - name: panvimdoc uses: kdheepak/panvimdoc@main with: @@ -20,10 +31,11 @@ jobs: docmapping: true docmappingprojectname: false dedupsubheadings: false + - name: Push changes uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: "chore: auto-generate vimdoc" + commit_message: "chore: update README and auto-generate vimdoc" commit_user_name: "github-actions[bot]" commit_user_email: "github-actions[bot]@users.noreply.github.com" commit_author: "github-actions[bot] " diff --git a/README.md b/README.md index 2dc47c4..7da2580 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,7 @@ Voice commands (`:GpWhisper*`) depend on `SoX` (Sound eXchange) to handle audio Below is a linked snippet with the default values, but I suggest starting with minimal config possible (just `openai_api_key` if you don't have `OPENAI_API_KEY` env set up). Defaults change over time to improve things, options might get deprecated and so on - it's better to change only things where the default doesn't fit your needs. + https://github.com/Robitx/gp.nvim/blob/3adf3dc7589f54cf7af887879c995aa9846aace5/lua/gp/config.lua#L8-L568 # Usage diff --git a/lua/gp/config.lua b/lua/gp/config.lua index 5cb9ff8..27a5601 100644 --- a/lua/gp/config.lua +++ b/lua/gp/config.lua @@ -5,6 +5,7 @@ -- Default config -------------------------------------------------------------------------------- +-- README_REFERENCE_MARKER_START local config = { -- Please start with minimal config possible. -- Just openai_api_key if you don't have OPENAI_API_KEY env set up. @@ -562,5 +563,6 @@ local config = { -- end, }, } +-- README_REFERENCE_MARKER_END return config