Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
fix: missing steps in README.md

fix: easier replace

fix: missing README.md mention

fix: test helpers

feat: add release script

chore: update README.md

feat: add setup script (#1)

this PR adds a setup script to make it easier for people to use the
template, it aims at automating the placeholder filenames/variables.

Full interactive test

<img width="1276" alt="Screenshot 2023-01-02 at 23 24 50"
src="https://user-images.githubusercontent.com/20689156/210281813-00ee3cca-581e-4372-94b8-dd528b5508ff.png">

feat: add doc generation check to CI (#2)

This PR adds a documentation check on the CI, so the user knows if they
forgot to generate latest version, or can see unwanted changes.

chore: typo in README

feat(cd): add release action (#4)

closes shortcuts/neovim-plugin-boilerplate#3

feat(cd): remove homemade release script (#6)

Now that we have the automated release process, we don't need the custom
part anymore

chore(main): release 1.0.0 (#5)

:robot: I have created a release *beep* *boop*
---

* add doc generation check to CI
([#2](shortcuts/neovim-plugin-boilerplate#2))
([15d4d14](shortcuts/neovim-plugin-boilerplate@15d4d14))
* add release script
([144c732](shortcuts/neovim-plugin-boilerplate@144c732))
* add setup script
([#1](shortcuts/neovim-plugin-boilerplate#1))
([fbffb71](shortcuts/neovim-plugin-boilerplate@fbffb71))
* **cd:** add release action
([#4](shortcuts/neovim-plugin-boilerplate#4))
([85cb257](shortcuts/neovim-plugin-boilerplate@85cb257))
* **cd:** remove homemade release script
([#6](shortcuts/neovim-plugin-boilerplate#6))
([316de3d](shortcuts/neovim-plugin-boilerplate@316de3d))

* easier replace
([0d686ea](shortcuts/neovim-plugin-boilerplate@0d686ea))
* missing README.md mention
([97b16e0](shortcuts/neovim-plugin-boilerplate@97b16e0))
* missing steps in README.md
([6ac7c6f](shortcuts/neovim-plugin-boilerplate@6ac7c6f))
* test helpers
([d65dd73](shortcuts/neovim-plugin-boilerplate@d65dd73))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

chore: add nightly to the CI (#7)

nightly is now usable on the CI! :D

chore: upgrade ci to run against Neovim 0.8.3 (#8)

update the CI to run against Neovim 0.8.3

chore: fix `bug report` issue template

fix: CI diff documentation (#9)

correctly get diff

chore: fix gh command in README.md

feat: make setup.sh more reliable

feat: template cleanup and improvements (#11)

better initial setup and remove useless functions

chore(main): release 1.1.0 (#10)

:robot: I have created a release *beep* *boop*
---

[1.1.0](shortcuts/neovim-plugin-boilerplate@v1.0.0...v1.1.0)
(2023-03-26)

* make setup.sh more reliable
([6c2f360](shortcuts/neovim-plugin-boilerplate@6c2f360))
* template cleanup and improvements
([#11](shortcuts/neovim-plugin-boilerplate#11))
([af2fcb0](shortcuts/neovim-plugin-boilerplate@af2fcb0))

* CI diff documentation
([#9](shortcuts/neovim-plugin-boilerplate#9))
([c4b9836](shortcuts/neovim-plugin-boilerplate@c4b9836))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

chore: make CI run on v0.9.0 (#12)

chore: run CI on neovim 0.9.1 (#13)

update the CI to run on the latest version

feat!: improve template helpers and state manager (#14)

While the template is still a pretty good starting point, improvements
have been made on [my main
plugin](https://github.com/shortcuts/no-neck-pain.nvim) for better
developer experience, we can port them here.

chore(main): release 2.0.0 (#15)

:robot: I have created a release *beep* *boop*
---

[2.0.0](shortcuts/neovim-plugin-boilerplate@v1.1.0...v2.0.0)
(2024-03-15)

* improve template helpers and state manager
([#14](shortcuts/neovim-plugin-boilerplate#14))

* improve template helpers and state manager
([#14](shortcuts/neovim-plugin-boilerplate#14))
([9cc87ad](shortcuts/neovim-plugin-boilerplate@9cc87ad))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

feat(ci): add luals checks on CI (#16)

[apply
recommendations](https://www.reddit.com/r/neovim/comments/1bfdp9m/comment/kv2ljvo/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)

chore(main): release 2.1.0 (#17)

:robot: I have created a release *beep* *boop*
---

[2.1.0](shortcuts/neovim-plugin-boilerplate@v2.0.0...v2.1.0)
(2024-03-16)

* **ci:** add luals checks on CI
([#16](shortcuts/neovim-plugin-boilerplate#16))
([2d0ecc4](shortcuts/neovim-plugin-boilerplate@2d0ecc4))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

feat(ci): bump stylua (#18)

bump stylua-action dependency

chore(main): release 2.2.0 (#19)

:robot: I have created a release *beep* *boop*
---

[2.2.0](shortcuts/neovim-plugin-boilerplate@v2.1.0...v2.2.0)
(2024-03-18)

* **ci:** bump stylua
([#18](shortcuts/neovim-plugin-boilerplate#18))
([d97ea98](shortcuts/neovim-plugin-boilerplate@d97ea98))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

chore: run on nvim 10 (#20)

feat!: renew template (#22)

Hey, as I keep working on
https://github.com/shortcuts/no-neck-pain.nvim, I discover new stuff,
tools, good lua practices and some fixes here and there, so I usually
port them to this template.

Hopefully this will help someone getting started!

close shortcuts/neovim-plugin-boilerplate#21

chore(main): release 3.0.0 (#23)

:robot: I have created a release *beep* *boop*
---

[3.0.0](shortcuts/neovim-plugin-boilerplate@v2.2.0...v3.0.0)
(2024-09-25)

* renew template
([#22](shortcuts/neovim-plugin-boilerplate#22))

* renew template
([#22](shortcuts/neovim-plugin-boilerplate#22))
([ca72698](shortcuts/neovim-plugin-boilerplate@ca72698))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

chore: add funding file

chore: update template for key-analyzer

chore: add config options

feat: Update README.md with plugin features and usage

chore: update README
  • Loading branch information
shortcuts authored and Vito Meznaric committed Nov 3, 2024
0 parents commit 59ec556
Show file tree
Hide file tree
Showing 27 changed files with 1,408 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @shortcuts
1 change: 1 addition & 0 deletions .github/CODEOWNERS_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @meznaric
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug Report
description: File a bug report.
title: '[bug]: '
labels: ['bug', 'triage']
body:
- type: markdown
attributes:
value: |
## Please help us help you!
Before filing your issue, ask yourself:
- Is there an issue already opened for this bug?
- Can I reproduce it?
In doubt, you can also open [a discussion](https://github.com/shortcuts/neovim-plugin-boilerplate/discussions/new/choose).
- type: textarea
attributes:
label: Description
description: A clear and concise description of what the bug is.
validations:
required: true
- type: dropdown
id: nvim-version
attributes:
label: Neovim version
description: Which Neovim version are you using?
options:
- 0.9.x
- 0.10.x
- Nightly
- <= 0.9.x
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: Write down the steps to reproduce the bug, please include any information that seems relevant for us to reproduce it properly
placeholder: |
1. I enter nvim with files `...`
2. I press the following keys `...`
3. I have those plugins enabled that might conflict `...`
4. See error
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. You can set `debug = true` in your neovim-plugin-boilerplate config and then use `:message<CR>` in order to see the logs.
render: shell
- type: checkboxes
attributes:
label: Self-service
description: |
If you feel like you could contribute to this issue, please check the box below. This would tell us and other people looking for contributions that someone's working on it.
options:
- label: I'd be willing to fix this bug myself.

58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug Report
description: File a bug report.
title: '[bug]: '
labels: ['bug', 'triage']
body:
- type: markdown
attributes:
value: |
## Please help us help you!
Before filing your issue, ask yourself:
- Is there an issue already opened for this bug?
- Can I reproduce it?
In doubt, you can also open [a discussion](https://github.com/otiv/key-analyzer.nvim/discussions/new/choose).
- type: textarea
attributes:
label: Description
description: A clear and concise description of what the bug is.
validations:
required: true
- type: dropdown
id: nvim-version
attributes:
label: Neovim version
description: Which Neovim version are you using?
options:
- 0.9.x
- 0.10.x
- Nightly
- <= 0.9.x
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: Write down the steps to reproduce the bug, please include any information that seems relevant for us to reproduce it properly
placeholder: |
1. I enter nvim with files `...`
2. I press the following keys `...`
3. I have those plugins enabled that might conflict `...`
4. See error
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. You can set `debug = true` in your key-analyzer.nvim config and then use `:message<CR>` in order to see the logs.
render: shell
- type: checkboxes
attributes:
label: Self-service
description: |
If you feel like you could contribute to this issue, please check the box below. This would tell us and other people looking for contributions that someone's working on it.
options:
- label: I'd be willing to fix this bug myself.

13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Feature request
about: Suggest anything that would make your life easier, or the plugin better.
---

## Describe the problem

<!-- Explain what the new feature is, or if it's for the documentation, what do you expect. -->

## Describe the solution

<!-- Explain what your solution would look like. -->

7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## 📃 Summary

<!-- Provide some context about the pull request, it makes the review easier. -->

## 📸 Preview

<!-- If there's a visual impact to your change, please provide a screenshot. You can directly upload it to GitHub by dragging in this text area. -->
165 changes: 165 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: main

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize]

env:
LUA_LS_VERSION: 3.7.4

concurrency:
group: github.head_ref
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
name: lint
steps:
- uses: actions/checkout@v4

- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check . -g '*.lua' -g '!deps/'

documentation:
runs-on: ubuntu-latest
name: documentation
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: setup neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: v0.10.1

- name: generate documentation
run: make documentation-ci

- name: check docs diff
run: exit $(git status --porcelain doc | wc -l | tr -d " ")

tests:
needs:
- lint
- documentation
runs-on: ubuntu-latest
timeout-minutes: 1
strategy:
matrix:
neovim_version: ['v0.9.5', 'v0.10.1']

steps:
- uses: actions/checkout@v4

- run: date +%F > todays-date

- name: restore cache for today's nightly.
uses: actions/cache@v4
with:
path: _neovim
key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }}

- name: restore luals cache
uses: actions/cache@v4
id: cache
with:
path: .ci/lua-ls
key: ${{ env.LUA_LS_VERSION }}

- name: setup luals
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: mkdir -p .ci/lua-ls && curl -sL "https://github.com/LuaLS/lua-language-server/releases/download/${{ env.LUA_LS_VERSION }}/lua-language-server-${{ env.LUA_LS_VERSION }}-linux-x64.tar.gz" | tar xzf - -C "${PWD}/.ci/lua-ls"

- name: setup neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.neovim_version }}

- name: run luals
run: |
export PATH="${PWD}/.ci/lua-ls/bin:${PATH}"
nvim --version
make luals-ci
- name: run tests
run: make test-ci

tests-nightly:
needs:
- lint
- documentation
runs-on: ubuntu-latest
timeout-minutes: 1
continue-on-error: true

steps:
- uses: actions/checkout@v4

- run: date +%F > todays-date

- name: restore cache for today's nightly.
uses: actions/cache@v4
with:
path: _neovim
key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }}

- name: restore luals cache
uses: actions/cache@v4
id: cache
with:
path: .ci/lua-ls
key: ${{ env.LUA_LS_VERSION }}

- name: setup luals
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: mkdir -p .ci/lua-ls && curl -sL "https://github.com/LuaLS/lua-language-server/releases/download/${{ env.LUA_LS_VERSION }}/lua-language-server-${{ env.LUA_LS_VERSION }}-linux-x64.tar.gz" | tar xzf - -C "${PWD}/.ci/lua-ls"

- name: setup neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: nightly

- name: run luals
run: |
export PATH="${PWD}/.ci/lua-ls/bin:${PATH}"
nvim --version
make luals-ci
- name: run tests
run: make test-ci

release:
name: release
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: simple
package-name: key-analyzer.nvim

- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d stable || true
git push origin :stable || true
git tag -a stable -m "Last Stable Release"
git push origin stable
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deps
**.DS_Store
.ci
4 changes: 4 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
globals = { "vim", "MiniTest" }
max_line_length = false

exclude_files = { "deps" }
11 changes: 11 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"runtime.version": "LuaJIT",
"diagnostics.globals": [
"vim",
"MiniTest"
],
"workspace.library": [
"/usr/local/share/nvim/runtime/lua",
".ci/neovim/share/nvim/runtime/lua"
]
}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Changelog

1 change: 1 addition & 0 deletions FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: shortcuts
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 <YOUR_NAME_HERE>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 59ec556

Please sign in to comment.