-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 834 Bytes
/
Copy pathMakefile
File metadata and controls
28 lines (22 loc) · 834 Bytes
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
NVIM ?= nvim
PLENARY_DIR := .tests/plenary.nvim
.PHONY: test deps fmt lint clean
test: deps
@$(NVIM) --headless --noplugin -u tests/minimal_init.lua \
-c "PlenaryBustedDirectory tests/ { minimal_init = 'tests/minimal_init.lua', sequential = true, timeout = 60000 }"
# Reuses an already-installed plenary when there is one; clones otherwise.
deps:
@if [ -d "$(PLENARY_DIR)" ]; then exit 0; fi; \
for d in "$$HOME/.local/share/nvim/lazy/plenary.nvim" \
"$$HOME/.local/share/nvim/site/pack"/*/start/plenary.nvim; do \
if [ -d "$$d" ]; then exit 0; fi; \
done; \
echo "cloning plenary.nvim into $(PLENARY_DIR)"; \
mkdir -p .tests && \
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim $(PLENARY_DIR)
fmt:
@stylua lua/ plugin/ tests/
lint:
@stylua --check lua/ plugin/ tests/
clean:
@rm -rf .tests