forked from saecki/nvim-treesitter-context
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (40 loc) · 1.16 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
43
44
45
46
47
48
49
50
51
.DEFAULT_GOAL := test
NEOVIM_BRANCH := master
FILTER=.*
NEOVIM := neovim-$(NEOVIM_BRANCH)
.PHONY: neovim
neovim: $(NEOVIM)
$(NEOVIM):
git clone --depth 1 https://github.com/neovim/neovim --branch $(NEOVIM_BRANCH) $@
make -C $@
nvim-treesitter:
git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter
nvim-treesitter/parser/%.so: nvim-treesitter $(NEOVIM)
VIMRUNTIME=$(NEOVIM)/runtime $(NEOVIM)/build/bin/nvim \
--headless \
--clean \
--cmd 'set rtp+=./nvim-treesitter' \
-c "TSInstallSync $*" \
-c "q"
export VIMRUNTIME=$(PWD)/$(NEOVIM)/runtime
.PHONY: test
test: $(NEOVIM) nvim-treesitter \
nvim-treesitter/parser/lua.so \
nvim-treesitter/parser/rust.so \
nvim-treesitter/parser/typescript.so
$(NEOVIM)/.deps/usr/bin/busted \
-v \
--lazy \
--helper=$(PWD)/test/preload.lua \
--output test.busted.outputHandlers.nvim \
--lpath=$(PWD)/$(NEOVIM)/?.lua \
--lpath=$(PWD)/$(NEOVIM)/build/?.lua \
--lpath=$(PWD)/$(NEOVIM)/runtime/lua/?.lua \
--lpath=$(PWD)/nvim-treesitter/lua/?.lua \
--lpath=$(PWD)/?.lua \
--lpath=$(PWD)/lua/?.lua \
--filter=$(FILTER) \
$(PWD)/test
-@stty sane
lint:
luacheck lua