Skip to content

Commit 02c0979

Browse files
committed
Merge branch 'main' into fix-range-sel
2 parents e6cb041 + b54cec3 commit 02c0979

40 files changed

+1056
-817
lines changed

.github/workflows/check_query_files.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,40 @@
1-
name: Linting and style checking
1+
name: Lint
22

33
on:
4+
push:
5+
branches:
6+
- "main"
47
pull_request:
58
branches:
69
- "main"
10+
workflow_dispatch:
711

812
jobs:
9-
luacheck:
10-
name: Luacheck
13+
lua:
14+
name: Lint Lua files
1115
runs-on: ubuntu-latest
1216
steps:
1317
- uses: actions/checkout@v4
1418

15-
- name: Prepare
19+
- name: Format
1620
run: |
17-
sudo apt-get update
18-
sudo add-apt-repository universe
19-
sudo apt install luarocks -y
20-
sudo luarocks install luacheck
21+
make formatlua
22+
git diff --exit-code
2123
22-
- name: Run Luacheck
23-
run: sudo ./scripts/style-check.sh
24+
- name: Lint
25+
run: make checklua
2426

25-
stylua:
26-
name: StyLua
27-
runs-on: ubuntu-latest
28-
steps:
29-
- uses: actions/checkout@v4
30-
- name: Lint with stylua
31-
uses: JohnnyMorganz/stylua-action@v4
32-
with:
33-
token: ${{ secrets.GITHUB_TOKEN }}
34-
version: latest
35-
args: --check .
36-
37-
format-queries:
38-
name: Lint queries
27+
queries:
28+
name: Lint query files
3929
runs-on: ubuntu-latest
40-
env:
41-
NVIM_TAG: stable
4230
steps:
4331
- uses: actions/checkout@v4
44-
- name: Prepare
45-
run: |
46-
bash ./scripts/ci-install-ubuntu-latest.sh
47-
wget -P scripts/ https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/main/scripts/format-queries.lua
48-
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
49-
cd ~/.local/share/nvim/site/pack/nvim-treesitter/start
50-
git clone https://github.com/nvim-treesitter/nvim-treesitter.git
5132

52-
- name: Lint
33+
- name: Format
5334
run: |
54-
nvim --headless -c "TSInstallSync query" -c "q"
55-
nvim -l scripts/format-queries.lua queries
35+
make formatquery
5636
git diff --exit-code
37+
38+
- name: Lint
39+
run: make lintquery
40+

.github/workflows/test.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
branches:
9+
- "main"
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-build-${{ github.ref }}
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
check_compilation:
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os: [ubuntu-latest]
26+
nvim_tag: [nightly]
27+
name: ${{ matrix.os }}
28+
runs-on: ${{ matrix.os }}
29+
env:
30+
NVIM_TS_DIR: .test-deps/nvim-treesitter
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: tree-sitter/setup-action/cli@v1
35+
- uses: ilammy/msvc-dev-cmd@v1
36+
37+
- name: Install and prepare Neovim
38+
env:
39+
NVIM_TAG: ${{ matrix.nvim_tag }}
40+
run: |
41+
bash ./scripts/ci-install.sh
42+
43+
- name: Install nvim-treesitter
44+
uses: actions/checkout@v4
45+
with:
46+
repository: nvim-treesitter/nvim-treesitter
47+
ref: main
48+
path: ${{ env.NVIM_TS_DIR }}
49+
50+
- name: Setup Parsers Cache
51+
id: parsers-cache
52+
uses: actions/cache@v4
53+
with:
54+
path: ~/.local/share/nvim/site/parser/
55+
key: parsers-${{ hashFiles('parsers.lua') }}
56+
57+
- name: Compile parsers
58+
if: steps.parsers-cache.outputs.cache-hit != 'true'
59+
working-directory: ${{ env.NVIM_TS_DIR }}
60+
run: nvim -l ./scripts/install-parsers.lua --max-jobs=10
61+
62+
- name: Lint docs
63+
run: |
64+
make docs
65+
git diff --exit-code
66+
67+
- name: Check queries
68+
run: make checkquery
69+
70+
- name: Run tests
71+
run: make tests

.github/workflows/tests.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/update-readme.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
.test-deps
12
doc/tags
23
.luacheckcache
34
/tags
5+
nvim.appimage
6+
nvim-linux-x86_64*
7+
nvim-macos*
8+
nvim-win64*

.luacheckrc

Lines changed: 0 additions & 17 deletions
This file was deleted.

.luarc.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
3+
"runtime": {
4+
"version": "LuaJIT"
5+
},
6+
"workspace": {
7+
"library": [
8+
"$VIMRUNTIME",
9+
"${3rd}/busted/library"
10+
],
11+
"ignoreDir": [
12+
".test-deps",
13+
"scripts",
14+
"tests"
15+
],
16+
"checkThirdParty": "Disable"
17+
},
18+
"diagnostics": {
19+
"groupFileStatus": {
20+
"strict": "Opened",
21+
"strong": "Opened"
22+
},
23+
"groupSeverity": {
24+
"strong": "Warning",
25+
"strict": "Warning"
26+
},
27+
"unusedLocalExclude": [ "_*" ]
28+
}
29+
}

.stylua.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
column_width = 100
2+
line_endings = "Unix"
13
indent_type = "Spaces"
24
indent_width = 2
3-
no_call_parentheses = true
5+
quote_style = "AutoPreferSingle"
6+
call_parentheses = "Always"

0 commit comments

Comments
 (0)