forked from projekt0n/github-nvim-theme
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (47 loc) · 1.46 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
55
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
all: docgen test check
.PHONY : docgen
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 \
-o doc/github-nvim-theme.txt \
Usage.md
$(pandocdir):
git clone --depth=1 --no-single-branch $(pandocrepo) $(pandocdir)
@rm -rf doc/panvimdoc/.git
.PHONY : test
test: $(PLENARY_DIR)
nvim \
--headless \
--noplugin \
-u test/minimal_init.vim \
-c "PlenaryBustedDirectory $(TEST_DIR) { minimal_init = './test/minimal_init.vim' }"
$(PLENARY_DIR):
git clone --depth=1 --no-single-branch $(PLENARY_URL) $(PLENARY_DIR)
@rm -rf $(PLENARY_DIR)/.git
.PHONY : check
check :
stylua --check lua/ test -f ./stylua.toml
.PHONY : fmt
fmt :
stylua lua/ test/ -f ./stylua.toml