-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
83 lines (66 loc) · 2.2 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
ifndef VERBOSE
.SILENT:
endif
stylua:
stylua --color always --check .
lua_ls-check:
@echo "Running lua-language-server check for version: $(version)"
if [ ! -f ci/.luarc.$(version).json ]; then \
echo "Error: Configuration file .luarc.$(version).json not found."; \
exit 1; \
fi
rm -rf .ci/lua_ls-log
cat $(CURDIR)/ci/.luarc.$(version).json
lua-language-server --configpath $(CURDIR)/ci/.luarc.$(version).json \
--logpath .ci/lua_ls-log --check lua
if [ ! -f .ci/lua_ls-log/check.json ]; then \
echo "Error: check.json not found."; \
exit 1; \
fi
# If file length is more than 2 characters (not just "[]"), print and exit
if [ `wc -m < .ci/lua_ls-log/check.json` -gt 2 ]; then \
echo "❌ Diagnostics found:"; \
cat .ci/lua_ls-log/check.json; \
exit 1; \
else \
echo "✅ No errors found."; \
fi
CONFIG_FILE = $(shell realpath ci/.luarc.$(version).json)
lua_ls-debug:
@echo "Running lua-language-server debug for version: $(version)"
if [ ! -f ${CONFIG_FILE} ]; then \
echo "Error: Configuration file $${CONFIG_FILE} not found."; \
exit 1; \
fi
rm -rf .ci/lua_ls-log
cat ${CONFIG_FILE}
lua-language-server --configpath ${CONFIG_FILE}\
--logpath .ci/lua_ls-log --check lua
echo "Debug log outputs: "; \
find .ci/lua_ls-log -type f -name "*.log" -exec cat {} \;
echo "VIMRUNTIME Environment Variable: $${VIMRUNTIME}";
echo "Absolute Runtime path: "; \
realpath .ci/neovim/share/nvim/runtime; \
echo "Absolute Treesitter runtime path: "; \
realpath .ci/neovim/share/nvim/runtime/lua/vim/treesitter/query.lua;
echo "Runtime path: "; \
ls -la .ci/neovim/share/nvim/runtime; \
echo "Treesitter runtime path: "; \
ls -la .ci/neovim/share/nvim/runtime/lua/vim/treesitter; \
echo "Treesitter query.lua: "; \
head .ci/neovim/share/nvim/runtime/lua/vim/treesitter/query.lua;
if [ ! -f .ci/lua_ls-log/check.json ]; then \
echo "Error: check.json not found."; \
exit 1; \
fi
# If file length is more than 2 characters (not just "[]"), print and exit
if [ `wc -m < .ci/lua_ls-log/check.json` -gt 2 ]; then \
echo "❌ Diagnostics found:"; \
cat .ci/lua_ls-log/check.json; \
exit 1; \
else \
echo "✅ No errors found."; \
fi
.PHONY: gendocs
gendocs:
sh ./scripts/gendoc.sh