aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshkan Kiani <ashkan.k.kiani@gmail.com>2019-11-14 15:20:31 -0800
committerGitHub <noreply@github.com>2019-11-14 15:20:31 -0800
commitec406e17fd86c321b084d877f66bc5f0280ed5c0 (patch)
treed15b5bd511ceef537841a2e300b9602c194882a8
parentSmall edits to readme (#4) (diff)
downloadnvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.gz
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.bz2
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.lz
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.xz
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.zst
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.zip
Add github actions for docgen (#7)
* Create main.yml * Update CONTRIBUTING and REAMDE. Explain that Github Actions generate README.
-rw-r--r--.github/workflows/main.yml34
-rw-r--r--CONTRIBUTING.md6
-rw-r--r--README.md16
-rw-r--r--README_preamble.md16
4 files changed, 54 insertions, 18 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 00000000..f7f01349
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,34 @@
+name: CI
+
+on: [push]
+
+jobs:
+ docgen:
+ runs-on: [ubuntu-latest]
+ if: github.ref != 'master'
+ steps:
+ - uses: actions/checkout@v1
+ - run: date +%F > todays-date
+ - name: Restore cache for today's nightly.
+ uses: actions/cache@v1.0.0
+ with:
+ path: _neovim
+ key: ${{ runner.os }}-nightly-${{ hashFiles('todays-date') }}
+ - name: Setup from neovim nightly and run docgen
+ run: |
+ curl -OL https://raw.githubusercontent.com/norcalli/bot-ci/master/scripts/github-actions-setup.sh
+ source github-actions-setup.sh nightly-x64
+ nvim -u NONE +'set rtp+=$PWD' +"luafile scripts/docgen.lua" +q
+ - name: Commit changes
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ COMMIT_MSG: |
+ [docgen] 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 add README.md
+ # 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})
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index efa8af67..d46017f7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -5,6 +5,11 @@
# Generating docs
+> NOTE: Github Actions automatically generates the docs, so only modify
+> README_preamble.md or the `docs` in the server config!
+
+The instructions here are for previewing changes locally.
+
`scripts/docgen.lua` was written with the intention of being sourced (like with `luafile`)
from `nvim` to run.
@@ -18,6 +23,7 @@ copy of `nvim_lsp` on your system.
This generates a suffix for README.md
+
# skeleton
skeleton has a `__newindex` metamethod which validates and creates
diff --git a/README.md b/README.md
index 51f92a83..eaf7b202 100644
--- a/README.md
+++ b/README.md
@@ -14,21 +14,19 @@ things as much as you want in addition to the defaults that this provides.
**CONTRIBUTIONS ARE WELCOME!**
There's a lot of language servers in the world, and not enough time. See
-[`lua/nvim_lsp/texlab.lua`](https://github.com/neovim/nvim-lsp/blob/master/lua/nvim_lsp/texlab.lua)
-and
-[`lua/nvim_lsp/skeleton.lua`](https://github.com/neovim/nvim-lsp/blob/master/lua/nvim_lsp/skeleton.lua)
-for examples and ask me questions in the [Neovim
-Gitter](https://gitter.im/neovim/neovim) to help me complete configurations for
-*all the LSPs!*
+[`lua/nvim_lsp/*.lua`](https://github.com/neovim/nvim-lsp/blob/master/lua/nvim_lsp/)
+for examples and ask us questions in the [Neovim
+Gitter](https://gitter.im/neovim/neovim) to help us complete configurations for
+*all the LSPs!* Read `CONTRIBUTING.md` for some instructions.
If you don't know where to start, you can pick one that's not in progress or
implemented from [this excellent list compiled by the coc.nvim
contributors](https://github.com/neoclide/coc.nvim/wiki/Language-servers) or
[this other excellent list from the emacs lsp-mode
contributors](https://github.com/emacs-lsp/lsp-mode#supported-languages)
-and create a new file under `lua/nvim_lsp/SERVER_NAME.lua`. I recommend looking
-at `lua/nvim_lsp/texlab.lua` for the most extensive example, but all of them
-are good references. Also read `CONTRIBUTING.md`.
+and create a new file under `lua/nvim_lsp/SERVER_NAME.lua`. We recommend
+looking at `lua/nvim_lsp/texlab.lua` for the most extensive example, but all of
+them are good references.
## Progress
diff --git a/README_preamble.md b/README_preamble.md
index 18e1566d..365eb5ae 100644
--- a/README_preamble.md
+++ b/README_preamble.md
@@ -14,21 +14,19 @@ things as much as you want in addition to the defaults that this provides.
**CONTRIBUTIONS ARE WELCOME!**
There's a lot of language servers in the world, and not enough time. See
-[`lua/nvim_lsp/texlab.lua`](https://github.com/neovim/nvim-lsp/blob/master/lua/nvim_lsp/texlab.lua)
-and
-[`lua/nvim_lsp/skeleton.lua`](https://github.com/neovim/nvim-lsp/blob/master/lua/nvim_lsp/skeleton.lua)
-for examples and ask me questions in the [Neovim
-Gitter](https://gitter.im/neovim/neovim) to help me complete configurations for
-*all the LSPs!*
+[`lua/nvim_lsp/*.lua`](https://github.com/neovim/nvim-lsp/blob/master/lua/nvim_lsp/)
+for examples and ask us questions in the [Neovim
+Gitter](https://gitter.im/neovim/neovim) to help us complete configurations for
+*all the LSPs!* Read `CONTRIBUTING.md` for some instructions.
If you don't know where to start, you can pick one that's not in progress or
implemented from [this excellent list compiled by the coc.nvim
contributors](https://github.com/neoclide/coc.nvim/wiki/Language-servers) or
[this other excellent list from the emacs lsp-mode
contributors](https://github.com/emacs-lsp/lsp-mode#supported-languages)
-and create a new file under `lua/nvim_lsp/SERVER_NAME.lua`. I recommend looking
-at `lua/nvim_lsp/texlab.lua` for the most extensive example, but all of them
-are good references. Also read `CONTRIBUTING.md`.
+and create a new file under `lua/nvim_lsp/SERVER_NAME.lua`. We recommend
+looking at `lua/nvim_lsp/texlab.lua` for the most extensive example, but all of
+them are good references.
## Progress