Skip to content

Commit

Permalink
garden: generate documentation using panvimdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
davvid committed Feb 18, 2024
1 parent 4cf97c8 commit ac491f1
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 23 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Generate docs and format code
on:
push:
branches: ['main', 'dev']
jobs:
postprocessing:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- run: sudo add-apt-repository ppa:neovim-ppa/stable
- run: sudo apt-get update
- run: sudo apt-get install -y bash neovim pandoc
- run: rustup toolchain install stable --profile minimal --no-self-update
- run: cargo install garden-tools
- run: cargo install stylua
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Generate docs
uses: kdheepak/panvimdoc@main
with:
description: ' Telescope plugin for searching repositories using "git grep"'
vimdoc: telescope-git-grep
pandoc: README.md
toc: 'false'
- run: garden -vv doc/post
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_author: cowcat <cowcat@localhost>
commit_message: 'doc: generate vim docs'
- run: garden -vv fmt
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_author: fatcat <fatcat@localhost>
commit_message: 'lua: code formatting'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.luarc.json
/panvimdoc
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# telescope-git-grep.nvim
# telescope-git-grep

*Telescope Git Grep* is a [telescope](https://github.com/nvim-telescope/telescope.nvim)
extension that uses `git grep` to search tracked files.
Expand Down
70 changes: 48 additions & 22 deletions garden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,55 @@
# Usage:
# garden check
# garden fmt
commands:
check>:
- luacheck
- check/fmt
luacheck: luacheck lua/*
check/fmt: garden fmt -- --check
fmt: |
stylua \
--call-parentheses Always \
--column-width 88 \
--indent-type Spaces \
--quote-style AutoPreferSingle \
"$@" \
lua/*/*.lua
#
# Generate documentation
# garden setup # One-time setup
# garden doc
trees:
telescope-git-grep.nvim:
telescope-git-grep:
description: Telescope plugin for searching repositories using "git grep"
path: ${GARDEN_CONFIG_DIR}
url: git@gitlab.com:davvid/telescope-git-grep.nvim
url: git@gitlab.com:davvid/telescope-git-grep.nvim.git
remotes:
github: git@github.com:davvid/telescope-git-grep.nvim.git
llllvvuu: git@github.com:llllvvuu/telescope-git-grep.nvim.git
gitconfig:
remote.publish.pushurl:
- git@gitlab.com:davvid/telescope-git-grep.nvim
- git@github.com:davvid/telescope-git-grep.nvim
remotes:
github: git@github.com:davvid/telescope-git-grep.nvim
llllvvuu: git@github.com:llllvvuu/telescope-git-grep.nvim
- git@gitlab.com:davvid/telescope-git-grep.nvim.git
- git@github.com:davvid/telescope-git-grep.nvim.git
environment:
PATH: ${GARDEN_CONFIG_DIR}/panvimdoc
commands:
check>:
- check/lua
- check/fmt
check/fmt: garden fmt -- --check
check/lua: luacheck lua/*
doc: |
panvimdoc.sh \
--description ' Telescope plugin for searching repositories using "git grep"' \
--input-file README.md \
--project-name ${TREE_NAME} \
--toc false
doc>:
- doc/post
doc/post: |
sed -i -e 's/Generated by panvimdoc.*//' doc/${TREE_NAME}.txt
nvim +'helptags doc | exit'
fmt: |
stylua \
--call-parentheses Always \
--column-width 88 \
--indent-type Spaces \
--quote-style AutoPreferSingle \
"$@" \
lua/*/*.lua
setup: |
garden -vv grow panvimdoc
garden -vv setup panvimdoc
panvimdoc:
description: Generate vimdoc documentation from pandoc markdown
url: https://github.com/kdheepak/panvimdoc.git
commands:
setup: sudo apt install pandoc

0 comments on commit ac491f1

Please sign in to comment.