forked from olimorris/codecompanion.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (40 loc) · 1.41 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
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
docs: $(PANVIMDOC_DIR)
@echo "===> Docs:" && \
cd $(PANVIMDOC_DIR) && \
pandoc \
--metadata="project:codecompanion" \
--metadata="vimversion:NVIM v0.9.2" \
--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
$(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 --branch v0.1.4 $(PLENARY_URL) $(PLENARY_DIR)
@rm -rf $(PLENARY_DIR)/.git
$(TREESITTER_DIR):
git clone --depth=1 --branch v0.9.1 $(TREESITTER_URL) $(TREESITTER_DIR)
@rm -rf $(TREESITTER_DIR)/.git