Regenerate nvim config
This commit is contained in:
50
config/neovim/store/nvim-treesitter/.github/workflows/lint.yml
vendored
Normal file
50
config/neovim/store/nvim-treesitter/.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
name: Linting and style checking
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
jobs:
|
||||
luacheck:
|
||||
name: Luacheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install luarocks -y
|
||||
sudo luarocks install luacheck
|
||||
|
||||
- name: Run Luacheck
|
||||
run: luacheck .
|
||||
|
||||
stylua:
|
||||
name: StyLua
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Lint with stylua
|
||||
uses: JohnnyMorganz/stylua-action@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
args: --check .
|
||||
|
||||
format-queries:
|
||||
name: Lint queries
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare
|
||||
run: |
|
||||
wget https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
|
||||
tar -zxf nvim-linux64.tar.gz
|
||||
sudo ln -s "$PWD"/nvim-linux64/bin/nvim /usr/local/bin
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
nvim -l scripts/format-queries.lua
|
||||
git diff --exit-code
|
||||
24
config/neovim/store/nvim-treesitter/.github/workflows/release.yml
vendored
Normal file
24
config/neovim/store/nvim-treesitter/.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: "release"
|
||||
on:
|
||||
push:
|
||||
tags: # Will upload to luarocks.org
|
||||
- "*"
|
||||
pull_request: # Will test a local install without uploading to luarocks.org
|
||||
paths:
|
||||
- 'contrib/*.rockspec'
|
||||
- .github/workflows/release.yml
|
||||
|
||||
jobs:
|
||||
luarocks-upload:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: nvim-neorocks/luarocks-tag-release@v5
|
||||
env:
|
||||
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
|
||||
with:
|
||||
name: nvim-treesitter
|
||||
detailed_description: |
|
||||
The goal of nvim-treesitter is both to provide a simple and easy way to use the interface for tree-sitter in Neovim
|
||||
and to provide some basic functionality such as highlighting based on it.
|
||||
template: contrib/nvim-treesitter-luarocks.template
|
||||
88
config/neovim/store/nvim-treesitter/.github/workflows/test-queries.yml
vendored
Normal file
88
config/neovim/store/nvim-treesitter/.github/workflows/test-queries.yml
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
name: Test queries
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
# Cancel any in-progress CI runs for a PR if it is updated
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
check_compilation:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-14]
|
||||
cc: [gcc, clang]
|
||||
nvim_tag: [stable]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
cc: clang
|
||||
nvim_tag: stable
|
||||
|
||||
- os: macos-14
|
||||
cc: gcc
|
||||
nvim_tag: stable
|
||||
|
||||
- os: windows-latest
|
||||
cc: clang
|
||||
nvim_tag: stable
|
||||
|
||||
include:
|
||||
- os: windows-latest
|
||||
cc: cl
|
||||
nvim_tag: nightly
|
||||
|
||||
- os: ubuntu-latest
|
||||
cc: gcc
|
||||
nvim_tag: nightly
|
||||
|
||||
name: Parser compilation
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
NVIM: ${{ matrix.os == 'windows-latest' && 'nvim-win64\\bin\\nvim.exe' || 'nvim' }}
|
||||
ALLOWED_INSTALLATION_FAILURES: ${{ matrix.os == 'windows-latest' && 'rnoweb' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: tree-sitter/setup-action/cli@v1
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Install and prepare Neovim
|
||||
env:
|
||||
NVIM_TAG: ${{ matrix.nvim_tag }}
|
||||
run: |
|
||||
bash ./scripts/ci-install.sh
|
||||
|
||||
- name: Setup Parsers Cache
|
||||
id: parsers-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./parser/
|
||||
~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/
|
||||
key: parsers-${{ join(matrix.*, '-') }}-${{ hashFiles(
|
||||
'./lockfile.json',
|
||||
'./lua/nvim-treesitter/install.lua',
|
||||
'./lua/nvim-treesitter/parsers.lua',
|
||||
'./lua/nvim-treesitter/shell_command_selectors.lua') }}
|
||||
|
||||
- name: Compile parsers
|
||||
run: $NVIM --headless -c "lua require'nvim-treesitter.install'.prefer_git=false" -c "TSInstallSync all" -c "q"
|
||||
|
||||
- name: Post compile Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: cp -r ~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/* parser
|
||||
|
||||
- name: Check query files
|
||||
run: $NVIM -l scripts/check-queries.lua
|
||||
65
config/neovim/store/nvim-treesitter/.github/workflows/tests.yml
vendored
Normal file
65
config/neovim/store/nvim-treesitter/.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
# Cancel any in-progress CI runs for a PR if it is updated
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check_compilation:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
cc: [gcc]
|
||||
|
||||
name: Run tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: tree-sitter/setup-action/cli@v1
|
||||
|
||||
- name: Test Dependencies
|
||||
run: |
|
||||
mkdir -p ~/.local/share/nvim/site/pack/plenary.nvim/start
|
||||
cd ~/.local/share/nvim/site/pack/plenary.nvim/start
|
||||
git clone https://github.com/nvim-lua/plenary.nvim
|
||||
curl -L https://github.com/theHamsta/highlight-assertions/releases/download/v0.1.6/highlight-assertions_v0.1.6_x86_64-unknown-linux-gnu.tar.gz | tar -xz
|
||||
cp highlight-assertions /usr/local/bin
|
||||
|
||||
- name: Install and prepare Neovim
|
||||
env:
|
||||
NVIM_TAG: stable
|
||||
run: |
|
||||
bash ./scripts/ci-install.sh
|
||||
|
||||
- name: Setup Parsers Cache
|
||||
id: parsers-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./parser/
|
||||
~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/
|
||||
key: parsers-${{ join(matrix.*, '-') }}-${{ hashFiles(
|
||||
'./lockfile.json',
|
||||
'./lua/nvim-treesitter/install.lua',
|
||||
'./lua/nvim-treesitter/parsers.lua',
|
||||
'./lua/nvim-treesitter/shell_selectors.lua') }}
|
||||
|
||||
- name: Compile parsers Unix like
|
||||
if: ${{ runner.os != 'Windows' && steps.parsers-cache.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
nvim --headless -c "TSInstallSync all" -c "q"
|
||||
|
||||
- name: Tests
|
||||
run: PATH=/usr/local/bin:$PATH ./scripts/run_tests.sh
|
||||
58
config/neovim/store/nvim-treesitter/.github/workflows/update-lockfile.yml
vendored
Normal file
58
config/neovim/store/nvim-treesitter/.github/workflows/update-lockfile.yml
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
name: Update lockfile
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 6 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-lockfile:
|
||||
name: Update lockfile
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.TOKEN_ID }}
|
||||
private-key: ${{ secrets.TOKEN_PRIVATE_KEY }}
|
||||
|
||||
- name: Prepare
|
||||
env:
|
||||
NVIM_TAG: stable
|
||||
run: |
|
||||
wget https://github.com/josephburnett/jd/releases/download/v1.7.1/jd-amd64-linux
|
||||
mv jd-amd64-linux /tmp/jd
|
||||
chmod +x /tmp/jd
|
||||
bash scripts/ci-install.sh
|
||||
|
||||
- name: Update parsers
|
||||
env:
|
||||
SKIP_LOCKFILE_UPDATE_FOR_LANGS: ""
|
||||
run: |
|
||||
cp lockfile.json /tmp/old_lockfile.json
|
||||
nvim -l scripts/write-lockfile.lua
|
||||
# Pretty print
|
||||
cp lockfile.json /tmp/lockfile.json
|
||||
cat /tmp/lockfile.json | jq --sort-keys > lockfile.json
|
||||
UPDATED_PARSERS=$(/tmp/jd -f merge /tmp/old_lockfile.json lockfile.json | jq -r 'keys | join(", ")')
|
||||
echo "UPDATED_PARSERS=$UPDATED_PARSERS" >> $GITHUB_ENV
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
author: "nvim-treesitter-bot[bot] <157957100+nvim-treesitter-bot[bot]@users.noreply.github.com>"
|
||||
commit-message: "bot(lockfile): update ${{ env.UPDATED_PARSERS }}"
|
||||
title: "Update lockfile.json: ${{ env.UPDATED_PARSERS }}"
|
||||
body: "[beep boop](https://github.com/peter-evans/create-pull-request)"
|
||||
branch: update-lockfile-pr
|
||||
base: ${{ github.head_ref }}
|
||||
|
||||
- name: Enable Pull Request Automerge
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
run: gh pr merge --rebase --auto update-lockfile-pr
|
||||
46
config/neovim/store/nvim-treesitter/.github/workflows/update-readme.yml
vendored
Normal file
46
config/neovim/store/nvim-treesitter/.github/workflows/update-readme.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
name: Update README
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-readme:
|
||||
name: Update README
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.TOKEN_ID }}
|
||||
private-key: ${{ secrets.TOKEN_PRIVATE_KEY }}
|
||||
|
||||
- name: Prepare
|
||||
env:
|
||||
NVIM_TAG: stable
|
||||
run: |
|
||||
bash ./scripts/ci-install.sh
|
||||
|
||||
- name: Check README
|
||||
run: |
|
||||
nvim -l scripts/update-readme.lua || echo 'Needs update'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
author: "nvim-treesitter-bot[bot] <157957100+nvim-treesitter-bot[bot]@users.noreply.github.com>"
|
||||
commit-message: "bot(readme): update"
|
||||
title: Update README
|
||||
body: "[beep boop](https://github.com/peter-evans/create-pull-request)"
|
||||
branch: update-readme-pr
|
||||
base: ${{ github.head_ref }}
|
||||
|
||||
- name: Enable Pull Request Automerge
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
run: gh pr merge --rebase --auto update-readme-pr
|
||||
Reference in New Issue
Block a user