diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 1bcd9ba0..45fd746a 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ +github: mrcjkb custom: ["https://paypal.me/simrat39", "https://www.buymeacoffee.com/simrat39"] diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..d3d3e24c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,63 @@ +name: Bug Report +description: Report a problem with ferris.nvim +labels: [bug] +body: + + - type: markdown + attributes: + value: | + _Before reporting:_ search [existing issues](https://github.com/mrcjkb/ferris.nvim/issues?q=is%3Aopen+is%3Aissue+label%3Abug). + See also: [Troubleshooting section of README.md](https://github.com/mrcjkb/ferris.nvim/blob/master/README.md#minimal-config). + + - type: input + attributes: + label: "Neovim version (nvim -v)" + placeholder: "v0.9.0" + validations: + required: true + - type: input + attributes: + label: "Operating system/version" + placeholder: "NixOS 22.05" + validations: + required: true + - type: input + attributes: + label: "Output of `:checkhealth ferris`" + validations: + required: true + - type: textarea + attributes: + label: "How to reproduce the issue" + description: | + Steps to reproduce using a [minimal config](https://github.com/mrcjkb/ferris.nvim/blob/master/troubleshooting/minimal.lua). + placeholder: | + mkdir -p /tmp/minimal + NVIM_DATA_MINIMAL=/tmp/minimal NVIM_APP_NAME="nvim-minimal" -u minimal.lua + :edit foo.rs + 4j + :RustHoverActions + validations: + required: true + - type: textarea + attributes: + label: "Expected behaviour" + description: "Describe the behaviour you expect. May include logs, images, or videos." + validations: + required: true + - type: textarea + attributes: + label: "Actual behaviour" + validations: + required: true + - type: textarea + attributes: + label: "The minimal config used to reproduce this issue." + description: | + See [this example](https://github.com/mrcjkb/ferris.nvim/blob/master/tests/minimal.lua). + placeholder: | + ```lua + -- paste your minimal config here + ``` + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..f15ca47a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,15 @@ +name: Feature request +description: Request an enhancement for ferris.nvim +labels: [enhancement] +body: + + - type: markdown + attributes: + value: | + Before requesting: search [existing issues](https://github.com/mrcjkb/ferris.nvim/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement). + + - type: textarea + attributes: + label: "Feature description" + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..cfdb0752 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,9 @@ + +###### Description of changes + +###### Things done + +- [ ] Tested, as applicable: + - [ ] Manually + - [ ] Added plenary specs +- [ ] Fits [CONTRIBUTING.md](https://github.com/mrcjkb/ferris.nvim/blob/master/CONTRIBUTING.md) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..23c4cb3b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 00000000..991eba2f --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,23 @@ +--- +name: Dependabot auto-approve +on: pull_request_target + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: "${{ secrets.GH_TOKEN_FOR_UPDATES }}" + - name: Approve PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }} diff --git a/.github/workflows/docgen.yml b/.github/workflows/docgen.yml new file mode 100644 index 00000000..a4bc74bf --- /dev/null +++ b/.github/workflows/docgen.yml @@ -0,0 +1,35 @@ +name: Generate docs + +on: + push: + branches-ignore: + - master + +jobs: + docs: + name: Generate docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v23 + - uses: cachix/cachix-action@v12 + with: + name: mrcjkb + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + + - name: Generating docs + run: nix run ".#docgen" + + - name: Update documentation + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMIT_MSG: | + docs(generated): update doc/ferris.txt + 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 doc/ + # 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/.github/workflows/flakehub-publish-tagged.yaml b/.github/workflows/flakehub-publish-tagged.yaml new file mode 100644 index 00000000..d2dbc346 --- /dev/null +++ b/.github/workflows/flakehub-publish-tagged.yaml @@ -0,0 +1,29 @@ +--- +name: "Publish tags to FlakeHub" +on: + push: + tags: + - "v?[0-9]+.[0-9]+.[0-9]+*" + workflow_dispatch: + inputs: + tag: + description: "The existing tag to publish to FlakeHub" + type: "string" + required: true +jobs: + flakehub-publish: + runs-on: "ubuntu-latest" + permissions: + id-token: "write" + contents: "read" + steps: + - uses: "actions/checkout@v4" + with: + ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}" + - uses: "DeterminateSystems/nix-installer-action@main" + - uses: "DeterminateSystems/flakehub-push@main" + with: + visibility: "public" + name: "mrcjkb/ferris.nvim" + tag: "${{ inputs.tag }}" + diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml new file mode 100644 index 00000000..5111d370 --- /dev/null +++ b/.github/workflows/nix-build.yml @@ -0,0 +1,27 @@ +name: "Nix build" +on: + pull_request: + push: + workflow_call: +jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v23 + - uses: cachix/cachix-action@v12 + with: + name: mrcjkb + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: nix flake check -L + + shell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v23 + - uses: cachix/cachix-action@v12 + with: + name: mrcjkb + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: nix build .#devShells.x86_64-linux.default -L diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..ef434326 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,14 @@ +name: PR +on: pull_request + +jobs: + conventional: + if: ${{ false }} # disable for now + name: Conventional PR + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + - uses: beemojs/conventional-pr-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..84fba851 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: "Release" +on: + push: + tags: + - "*" + pull_request: + +jobs: + luarocks-release: + runs-on: ubuntu-latest + name: LuaRocks upload + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Fail if changelog entry does not exist + if: startsWith(github.ref, 'refs/tags/') + run: grep -q "${{ github.ref_name }}" CHANGELOG.md + - name: LuaRocks Upload + uses: nvim-neorocks/luarocks-tag-release@v5 + env: + LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} + with: + detailed_description: | + This plugin automatically configures the rust-analyzer builtin LSP client + and integrates with other Rust tools. See the README's #features section + for more info. + - name: GitHub Release + if: startsWith(github.ref, 'refs/tags/') + uses: ncipollo/release-action@v1 + with: + bodyFile: "CHANGELOG.md" + allowUpdates: true + diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 00000000..aca79b98 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,31 @@ +name: update-flake-lock +on: + workflow_dispatch: # allows manual triggering + schedule: + - cron: '0 0 * * 0' # runs weekly on Sunday at 00:00 + +jobs: + lockfile: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Nix + uses: cachix/install-nix-action@v23 + with: + extra_nix_config: | + experimental-features = nix-command flakes + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Update flake.lock + uses: DeterminateSystems/update-flake-lock@v20 + with: + token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} + pr-title: "chore: update flake.lock" # Title of PR to be created + pr-labels: | # Labels to be set on the PR + dependencies + automated + - uses: reitermarkus/automerge@v2 + with: + token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} + merge-method: squash + pull-request: ${{ github.event.inputs.pull-request }} diff --git a/nvim-ferris.svg b/nvim-ferris.svg index a8d1b8d4..24f2305a 100644 --- a/nvim-ferris.svg +++ b/nvim-ferris.svg @@ -232,7 +232,7 @@