forked from olimorris/codecompanion.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
98 lines (88 loc) · 3 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
PANVIMDOC_DIR = misc/panvimdoc
PANVIMDOC_URL = https://github.com/kdheepak/panvimdoc
PLENARY_DIR = misc/plenary
PLENARY_URL = https://github.com/nvim-lua/plenary.nvim
TREESITTER_DIR = misc/treesitter
TREESITTER_URL = https://github.com/nvim-treesitter/nvim-treesitter
all: format test docs tools adapters recipes
docs: $(PANVIMDOC_DIR)
@echo "===> Docs:" && \
cd $(PANVIMDOC_DIR) && \
pandoc \
--metadata="project:codecompanion" \
--metadata="vimversion:NVIM v0.10.0" \
--metadata="titledatepattern:%Y %B %d" \
--metadata="toc:true" \
--metadata="incrementheadinglevelby:0" \
--metadata="treesitter:true" \
--lua-filter scripts/skip-blocks.lua \
--lua-filter scripts/include-files.lua \
--lua-filter scripts/remove-emojis.lua \
-t scripts/panvimdoc.lua \
../../README.md \
-o ../../doc/codecompanion.txt
tools: $(PANVIMDOC_DIR)
@echo "===> Tools:" && \
cd $(PANVIMDOC_DIR) && \
pandoc \
--metadata="project:codecompanion-tools" \
--metadata="vimversion:NVIM v0.10.0" \
--metadata="titledatepattern:%Y %B %d" \
--metadata="toc:true" \
--metadata="incrementheadinglevelby:0" \
--metadata="treesitter:true" \
--lua-filter scripts/skip-blocks.lua \
--lua-filter scripts/include-files.lua \
--lua-filter scripts/remove-emojis.lua \
-t scripts/panvimdoc.lua \
../../doc/TOOLS.md \
-o ../../doc/codecompanion-tools.txt
adapters: $(PANVIMDOC_DIR)
@echo "===> Adapters:" && \
cd $(PANVIMDOC_DIR) && \
pandoc \
--metadata="project:codecompanion-adapters" \
--metadata="vimversion:NVIM v0.10.0" \
--metadata="titledatepattern:%Y %B %d" \
--metadata="toc:true" \
--metadata="incrementheadinglevelby:0" \
--metadata="treesitter:true" \
--lua-filter scripts/skip-blocks.lua \
--lua-filter scripts/include-files.lua \
--lua-filter scripts/remove-emojis.lua \
-t scripts/panvimdoc.lua \
../../doc/ADAPTERS.md \
-o ../../doc/codecompanion-adapters.txt
recipes: $(PANVIMDOC_DIR)
@echo "===> Recipes:" && \
cd $(PANVIMDOC_DIR) && \
pandoc \
--metadata="project:codecompanion-recipes" \
--metadata="vimversion:NVIM v0.10.0" \
--metadata="titledatepattern:%Y %B %d" \
--metadata="toc:true" \
--metadata="incrementheadinglevelby:0" \
--metadata="treesitter:true" \
--lua-filter scripts/skip-blocks.lua \
--lua-filter scripts/include-files.lua \
--lua-filter scripts/remove-emojis.lua \
-t scripts/panvimdoc.lua \
../../doc/RECIPES.md \
-o ../../doc/codecompanion-recipes.txt
$(PANVIMDOC_DIR):
git clone --depth=1 --no-single-branch $(PANVIMDOC_URL) $(PANVIMDOC_DIR)
@rm -rf doc/panvimdoc/.git
format:
@echo "===> Formatting:"
@stylua lua/ -f ./stylua.toml
test: $(PLENARY_DIR) $(TREESITTER_DIR)
@echo "===> Testing:"
nvim --headless --clean \
-u scripts/minimal.vim \
-c "PlenaryBustedDirectory lua/spec/codecompanion { minimal_init = 'scripts/minimal.vim' }"
$(PLENARY_DIR):
git clone --depth=1 $(PLENARY_URL) $(PLENARY_DIR)
@rm -rf $(PLENARY_DIR)/.git
$(TREESITTER_DIR):
git clone --depth=1 $(TREESITTER_URL) $(TREESITTER_DIR)
@rm -rf $(TREESITTER_DIR)/.git