-
Notifications
You must be signed in to change notification settings - Fork 248
/
Copy pathMakefile
42 lines (30 loc) · 1.36 KB
/
Makefile
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
.PHONY: test
test:
nvim --headless --noplugin -u tests/mininit.lua -c "lua require('plenary.test_harness').test_directory('tests/neo-tree/', {minimal_init='tests/mininit.lua',sequential=true})"
.PHONY: test-docker
test-docker:
docker build -t neo-tree .
docker run --rm neo-tree make test
.PHONY: format
format:
stylua --glob '*.lua' --glob '!defaults.lua' .
# Dependencies:
DEPS := ./.dependencies/site/pack/vendor/start
$(DEPS):
mkdir -p "$(DEPS)"
$(DEPS)/nui.nvim: $(DEPS)
@test -d "$(DEPS)/nui.nvim" || git clone https://github.com/MunifTanjim/nui.nvim "$(DEPS)/nui.nvim"
$(DEPS)/nvim-web-devicons: $(DEPS)
@test -d "$(DEPS)/nvim-web-devicons" || git clone https://github.com/nvim-tree/nvim-web-devicons "$(DEPS)/nvim-web-devicons"
$(DEPS)/plenary.nvim: $(DEPS)
@test -d "$(DEPS)/plenary.nvim" || git clone https://github.com/nvim-lua/plenary.nvim "$(DEPS)/plenary.nvim"
setup: $(DEPS)/nui.nvim $(DEPS)/nvim-web-devicons $(DEPS)/plenary.nvim
@echo "[setup] environment ready"
.PHONY: clean
clean:
rm -rf "$(DEPS)"
CONFIGURATION = .luarc.json
luals-check: setup
VIMRUNTIME="`nvim --clean --headless --cmd 'lua io.write(vim.env.VIMRUNTIME)' --cmd 'quit'`" lua-language-server --configpath=$(CONFIGURATION) --check=.
emmylua-check: setup
VIMRUNTIME="`nvim --clean --headless --cmd 'lua io.write(vim.env.VIMRUNTIME)' --cmd 'quit'`" emmylua_check -c $(CONFIGURATION) .