Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·74 lines (54 loc) · 2.02 KB
/
Copy pathMakefile
File metadata and controls
executable file
·74 lines (54 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.PHONY: clean test test-fail-fast test-e2e lux-sync lux-build lux-lint lux-test
all: hooks test
hooks:
pre-commit install
test: install
bash scripts/test
test-fail-fast: install
bash scripts/test --fail-fast
test-e2e: install
@tests/e2e/run-all.sh
install: deps/nvim-treesitter deps/nvim-treesitter/parser/java.so deps/neotest deps/nvim-nio deps/plenary.nvim
# plenary.nvim is NOT a dependency of neotest-java (see #317 — our code now
# uses vim.system/vim.uv directly). It IS a transitive dependency of
# nvim-neotest/neotest itself (neotest.lib.file/positions/subprocess require
# plenary.path), so the e2e harness — which builds a real user-like
# environment by hand instead of using a plugin manager — must provide it,
# just as lazy.nvim/packer would in a real setup.
deps/plenary.nvim:
mkdir -p deps
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim.git $@
deps/nvim-treesitter:
mkdir -p deps
git clone --branch master --depth 1 https://github.com/nvim-treesitter/nvim-treesitter.git $@
deps/neotest:
mkdir -p deps
git clone https://github.com/nvim-neotest/neotest $@
git -C $@ checkout 7bef09d1170f8fb33c41607ca54f963cbdbf708d
deps/nvim-nio:
mkdir -p deps
git clone --depth 1 https://github.com/nvim-neotest/nvim-nio $@
deps/nvim-treesitter/parser/java.so: deps/nvim-treesitter
@if [ ! -d deps/tree-sitter-java ]; then \
git clone https://github.com/tree-sitter/tree-sitter-java deps/tree-sitter-java; \
fi
cd deps/tree-sitter-java && cc -o parser.so -I./src src/parser.c -Os -std=c11 -shared
mkdir -p $$(dirname $@)
cp deps/tree-sitter-java/parser.so $@
clean:
rm -rf deps/nvim-treesitter deps/neotest deps/tree-sitter-java
validate:
stylua --check .
format:
stylua .
# Lux targets (https://github.com/lumen-oss/lux).
# lux.toml is the single source of truth for the luarocks package.
# These require `lx` on PATH (see https://lux.lumen-labs.org).
lux-sync:
lx --lua-version 5.1 sync
lux-build:
lx --lua-version 5.1 build
lux-lint:
lx --lua-version 5.1 lint
lux-test:
lx --lua-version 5.1 test