-
Notifications
You must be signed in to change notification settings - Fork 249
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (62 loc) · 1.94 KB
/
Makefile
File metadata and controls
72 lines (62 loc) · 1.94 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
nvim ?= nvim
#
# Run all tests or specic module tests
#
# Test both stable and nightly (assuming `nv` is linked to nightly):
# `make test nvim=nv` or `make test nvim="nvim nv"` (for both)
#
# Test specific module(s) with `make test glob=file`
# NOTE: glob is resolved using `vim.fn.globpath` so we can also run:
# `make test glob=f`
#
.PHONY: test
test:
for nvim_exec in $(nvim); do \
printf "\n======\n\n" ; \
$$nvim_exec --version | head -n 1 && echo '' ; \
$$nvim_exec --headless --noplugin -u ./scripts/minimal_init.lua \
-l ./scripts/make_cli.lua ; \
done
# clean / update all screenshots
.PHONY: screenshots
screenshots:
make test update_screenshots=true
.PHONY: clean-screenshots
clean-screenshots:
rm -rf tests/screenshots/*
make test
#
# Download 'mini.nvim' and `nvim-web-devicons` into "deps" subfolder
# only used with the CI workflow, `minimal_init` will detect the deps
# in our lazy.nvim local config
#
.PHONY: deps
deps:
make clean
@mkdir -p deps
make deps/fzf-lua
git clone --depth=1 --single-branch https://github.com/nvim-mini/mini.nvim deps/mini.nvim
git clone --depth=1 --single-branch https://github.com/nvim-tree/nvim-web-devicons deps/nvim-web-devicons
git clone --depth=1 --single-branch https://github.com/hrsh7th/nvim-cmp deps/nvim-cmp
git clone --depth=1 --single-branch https://github.com/mfussenegger/nvim-dap.git deps/nvim-dap
# Target to clone the repository and checkout the specific SHA
SHA=abe5ecafebb4e24feb162384d5f492431036e791
.PHONY: deps/fzf-lua
deps/fzf-lua:
@mkdir -p deps
git clone .git $@
(cd $@ && git checkout $(SHA))
.PHONY: lint
lint:
VIMRUNTIME="$$(nvim --clean --headless +'echo $$VIMRUNTIME' +q 2>&1)" lua-language-server --configpath=../.luarc.jsonc --check=.
.PHONY: emmylua-check
emmylua-check:
VIMRUNTIME="$$(nvim --clean --headless +'echo $$VIMRUNTIME' +q 2>&1)" \
emmylua_check . \
--ignore 'deps/**/*'
gen:
nvim --clean -l lua/fzf-lua/init.lua
# clean up
.PHONY: clean
clean:
rm -rf deps