Skip to content

Commit

Permalink
Feat/format_tree (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wansmer authored Mar 13, 2023
1 parent fe3283a commit cf48190
Show file tree
Hide file tree
Showing 133 changed files with 5,847 additions and 3,973 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI
on:
push:
pull_request:

jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Neovim
shell: bash
run: |
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.deb -O /tmp/nvim.deb
sudo dpkg -i /tmp/nvim.deb
- name: Run Tests
run: |
nvim --version
[ ! -d tests ] && exit 0
nvim --headless -u tests/minimal.lua -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal.lua', sequential = true}"
docs:
runs-on: ubuntu-latest
needs: tests
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v3
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: treesj
version: "Neovim >= 0.8.0"
demojify: true
treesitter: true
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "task: auto-generate vimdoc"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
32 changes: 26 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,36 @@ preinstall-ts-parsers:

# LP string = language path
test-langs:
nvim --headless -u tests/minimal.lua -c "PlenaryBustedDirectory tests/langs/${LP} {minimal_init = 'tests/minimal.lua'}"

test-langs-tab:
nvim --headless -u tests/minimal_tab.lua -c "PlenaryBustedDirectory tests/langs_tab {minimal_init = 'tests/minimal_tab.lua'}"
nvim --headless -u tests/minimal.lua -c "PlenaryBustedDirectory tests/langs/${LP} { minimal_init = 'tests/minimal.lua' }"

test-chold:
nvim --headless -u tests/minimal.lua -c "PlenaryBustedDirectory tests/chold {minimal_init = 'tests/minimal.lua'}"

# M string = mode 'start'|'end'|'hold'
test-chold-m:
nvim --headless -u tests/minimal.lua -c "PlenaryBustedDirectory tests/chold/${M}_spec.lua {minimal_init = 'tests/minimal.lua'}"

test-chold-r:
nvim --headless -u tests/minimal.lua -c "PlenaryBustedDirectory tests/chold/hold_split_recursive_spec.lua {minimal_init = 'tests/minimal.lua'}"

test:
make test-langs && make test-langs-tab && make test-chold
make test-langs && make test-chold

lint-fix:
stylua ./lua/treesj
stylua ./lua/treesj ./tests/langs/

docs:
~/projects/code/github/panvimdoc/panvimdoc.sh \
--project-name treesj \
--input-file ./README.md \
--vim-version 0.8.0 \
--toc true \
--description "" \
--dedup-subheadings true \
--demojify false \
--treesitter true \
--ignore-rawblocks false \
--doc-mapping true \
--doc-mapping-project-name true \
--shift-heading-level-by 0 \
--increment-heading-level-by 0 \
Loading

0 comments on commit cf48190

Please sign in to comment.