Skip to content

Commit 8a29fdf

Browse files
kiyoonclason
authored andcommitted
refactor!: make this an standalone plugin
details: - This plugin no longer depends on nvim-treesitter nor it's modules system. - A bunch of code previously owned by nvim-treesitter has been moved to this plugin and been refactored. - The user interface has changed in the following ways: - keymaps are no longer an option provided via the `setup` function. Users are expected to create them using `vim.keymap.set` - User commands have been removed for now. - Python dependant tests (consistency_tests) have been removed - Check #523 for more info
1 parent 41e3abf commit 8a29fdf

25 files changed

+2230
-1619
lines changed

.github/workflows/check_query_files.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
pull_request:
66
schedule:
7-
- cron: '0 0 * * *' # every day at midnight
7+
- cron: "0 0 * * *" # every day at midnight
88

99
jobs:
1010
luacheck:
@@ -19,20 +19,21 @@ jobs:
1919

2020
- name: Prepare
2121
env:
22-
NVIM_TAG: stable
22+
NVIM_TAG: nightly
2323
run: |
2424
sudo apt-get update && sudo apt-get install libfuse2
2525
sudo add-apt-repository universe
26-
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim.appimage
27-
chmod u+x nvim.appimage
26+
wget https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
27+
tar -zxf nvim-linux64.tar.gz
28+
sudo ln -s "$PWD"/nvim-linux64/bin/nvim /usr/local/bin
2829
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter-textobject/start
2930
ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter-textobject/start
3031
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
3132
cd ~/.local/share/nvim/site/pack/nvim-treesitter/start
32-
git clone https://github.com/nvim-treesitter/nvim-treesitter.git
33+
git clone -b main https://github.com/nvim-treesitter/nvim-treesitter.git
3334
3435
- name: Compile parsers
35-
run: ./nvim.appimage --headless -c "TSInstallSync all" -c "q"
36+
run: nvim -l scripts/install_parsers.lua all
3637

3738
- name: Check query files
38-
run: ./nvim.appimage --headless -c "luafile ./scripts/check-queries.lua" -c "q"
39+
run: nvim --headless -c "luafile ./scripts/check-queries.lua" -c "q"

.github/workflows/lint.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
name: StyLua
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v3
27-
- name: Lint with stylua
28-
uses: JohnnyMorganz/stylua-action@v2
29-
with:
30-
token: ${{ secrets.GITHUB_TOKEN }}
31-
version: latest
32-
args: --check .
26+
- uses: actions/checkout@v3
27+
- name: Lint with stylua
28+
uses: JohnnyMorganz/stylua-action@v2
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
version: latest
32+
args: --check .
3333

3434
format-queries:
3535
name: Lint queries

.github/workflows/tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
types: [opened, synchronize, reopened, ready_for_review]
77
branches:
8-
- 'master'
8+
- "master"
99

1010
# Cancel any in-progress CI runs for a PR if it is updated
1111
concurrency:
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
os: [ubuntu-latest]
2121
cc: [gcc]
22-
nvim_tag: [stable, nightly]
22+
nvim_tag: [nightly]
2323

2424
name: Run tests
2525
runs-on: ${{ matrix.os }}
@@ -37,7 +37,7 @@ jobs:
3737
mkdir -p ~/.local/share/nvim/site/pack/ci/opt
3838
cd ~/.local/share/nvim/site/pack/ci/opt
3939
git clone https://github.com/nvim-lua/plenary.nvim
40-
git clone https://github.com/nvim-treesitter/nvim-treesitter
40+
git clone -b main https://github.com/nvim-treesitter/nvim-treesitter.git
4141
- name: Install and prepare Neovim
4242
env:
4343
NVIM_TAG: ${{ matrix.nvim_tag }}
@@ -55,6 +55,6 @@ jobs:
5555
- name: Compile parsers Unix like
5656
if: ${{ matrix.os != 'windows-latest' && steps.parsers-cache.outputs.cache-hit != 'true' }}
5757
run: |
58-
nvim --headless -c "TSInstallSync all" -c "q"
58+
run: ./nvim.appimage -l scripts/install_parsers.lua all
5959
- name: Tests
6060
run: PATH=/usr/local/bin:$PATH ./scripts/run_tests.sh

.github/workflows/update-readme.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter-textobject/start
2727
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
2828
cd ~/.local/share/nvim/site/pack/nvim-treesitter/start
29-
git clone https://github.com/nvim-treesitter/nvim-treesitter.git
29+
git clone -b main https://github.com/nvim-treesitter/nvim-treesitter.git
3030
3131
- name: Compile parsers
32-
run: ./nvim.appimage --headless -c "TSInstallSync all" -c "q"
32+
run: ./nvim.appimage -l scripts/install_parsers.lua all
3333

3434
# inspired by nvim-lspconfigs
3535
- name: Check README

0 commit comments

Comments
 (0)