-
-
Notifications
You must be signed in to change notification settings - Fork 108
/
Makefile
54 lines (45 loc) · 1.57 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
52
53
54
pandocrepo ::= https://github.com/kdheepak/panvimdoc
pandocdir ::= misc/panvimdoc
TEST_DIR ::= test/github-theme
PLENARY_DIR ::= test/plenary
PLENARY_URL ::= https://github.com/nvim-lua/plenary.nvim/
root_dir ::= $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
.PHONY: all docgen test check fmt diagnose
all: docgen test check
docgen: $(pandocdir)
@pandoc \
--citeproc \
--shift-heading-level-by=0 \
--metadata=project:github-nvim-theme \
--metadata=vimversion:8.0 \
--metadata=toc:true \
--metadata="description:Github's Neovim themes" \
--metadata=dedupsubheadings:true \
--metadata=ignorerawblocks:true \
--metadata=docmapping:true \
--metadata=docmappingproject:true \
--metadata=treesitter:true \
--metadata=incrementheadinglevelby:0 \
--lua-filter=misc/panvimdoc/scripts/skip-blocks.lua \
--lua-filter=misc/panvimdoc/scripts/include-files.lua \
-t misc/panvimdoc/scripts/panvimdoc.lua \bu
-o doc/github-nvim-theme.txt \
Usage.md
$(pandocdir):
git clone --depth=1 --no-single-branch $(pandocrepo) $(pandocdir)
@rm -rf doc/panvimdoc/.git
test: $(PLENARY_DIR)
nvim \
--headless \
--noplugin \
-u test/minimal_init.vim \
-c "PlenaryBustedDirectory $(TEST_DIR) { minimal_init = './test/minimal_init.vim', sequential = true }"
$(PLENARY_DIR):
git clone --depth=1 --no-single-branch $(PLENARY_URL) $(PLENARY_DIR)
@rm -rf $(PLENARY_DIR)/.git
check:
stylua --check lua/ test -f ./stylua.toml
fmt:
stylua lua/ test/ -f ./stylua.toml
diagnose:
scripts/diagnose Hint