Skip to content

Commit

Permalink
docs: documentation overhaul (neovim#1384)
Browse files Browse the repository at this point in the history
* remove automated generation of vimdoc + ci
* unify ADVANCED_README.md and vimdoc
* rename CONFIGS.md to server_configurations.md, move into doc folder
* move CONTRIBUTING.md to .github folder
  • Loading branch information
mjlbach authored Nov 9, 2021
1 parent 3b20930 commit 3d85ff4
Show file tree
Hide file tree
Showing 10 changed files with 8,447 additions and 8,334 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ PRs are checked with Luacheck and stylua. Please run the linter locally before s

## Generating docs

Github Actions automatically generates the `CONFIG.md`. Only modify `scripts/README_template.md` or the `docs` table in the server config (the lua file). Do not modify `CONFIG.md` directly.
Github Actions automatically generates `server_configurations.md`. Only modify `scripts/README_template.md` or the `docs` table in the server config (the lua file). Do not modify `server_configurations.md` directly.

To preview the generated `CONFIG.md` locally, run `scripts/docgen.lua` from
To preview the generated `server_configurations.md` locally, run `scripts/docgen.lua` from
`nvim` (from the project root):

nvim -R -Es +'set rtp+=$PWD' +'luafile scripts/docgen.lua'
41 changes: 0 additions & 41 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,44 +30,3 @@ jobs:
git add CONFIG.md
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push)
vimdocgen:
needs: docgen
runs-on: [ubuntu-latest]
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: nightly
- name: Install plugins
run: |
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/mjlbach/babelfish.nvim ~/.local/share/nvim/site/pack/vendor/start/babelfish.nvim
git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
- name: Build parser
run: |
export PACKPATH=$HOME/.local/share/nvim/site
nvim -u ~/.local/share/nvim/site/pack/vendor/start/babelfish.nvim/scripts/init.lua --headless -c 'TSInstallSync markdown' -c 'qa'
- name: Generating docs
run: |
export PATH="${PWD}/build/:${PATH}"
export PACKPATH=$HOME/.local/share/nvim/site
nvim -u ~/.local/share/nvim/site/pack/vendor/start/babelfish.nvim/scripts/init.lua --headless -c 'luafile ./scripts/vimdocgen.lua' -c 'qa'
- name: Commit changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_MSG: |
docs: update README.md
skip-checks: true
run: |
git config user.email "actions@github"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git pull
git add doc/lspconfig.txt
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})
14 changes: 7 additions & 7 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pull_request_rules:
- name: disallow changing a file
conditions:
- files=CONFIG.md
actions:
close:
comment:
message: "CONFIG.md is auto-generated: edit the lua source file instead (and re-read the PR template)."
# - name: disallow changing a file
# conditions:
# - files=CONFIG.md
# actions:
# close:
# comment:
# message: "CONFIG.md is auto-generated: edit the lua source file instead (and re-read the PR template)."
215 changes: 0 additions & 215 deletions ADVANCED_README.md

This file was deleted.

Loading

0 comments on commit 3d85ff4

Please sign in to comment.