Skip to content

Commit 9bdd553

Browse files
committed
chore: more consistent dev env
1 parent b2c012f commit 9bdd553

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/doc/tags
22
/.tests/
3+
/.dev/

.luarc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
"cast-type-mismatch",
66
"missing-fields"
77
],
8+
"runtime.version": "LuaJIT",
89
"workspace.checkThirdParty": false,
910
"workspace.library": [
10-
"$VIMRUNTIME",
11+
"./lua",
12+
"$VIMRUNTIME/lua",
13+
".dev/lua/nvim"
1114
]
1215
}

Makefile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.PHONY: all
2-
all: test
2+
all: dev test
33

44
TEST_PATH := $(if $(TEST_PATH),$(TEST_PATH),lua/diffview/tests/)
55
export TEST_PATH
@@ -12,9 +12,22 @@ export TEST_PATH
1212
# $ TEST_PATH=tests/some/path make test
1313
.PHONY: test
1414
test:
15-
nvim --headless -i NONE -n -u scripts/minimal_init.lua -c \
16-
"PlenaryBustedDirectory $(TEST_PATH) { minimal_init = './scripts/minimal_init.lua' }"
15+
nvim --headless -i NONE -n -u scripts/test_init.lua -c \
16+
"PlenaryBustedDirectory $(TEST_PATH) { minimal_init = './scripts/test_init.lua' }"
17+
18+
.PHONY: dev
19+
dev: .dev/lua/nvim
20+
21+
.dev/lua/nvim:
22+
mkdir -p "$@"
23+
git clone --filter=blob:none https://github.com/folke/neodev.nvim.git "$@/repo"
24+
cd "$@/repo" && git -c advice.detachedHead=false checkout ce9a2e8eaba5649b553529c5498acb43a6c317cd
25+
cp "$@/repo/types/nightly/uv.lua" \
26+
"$@/repo/types/nightly/cmd.lua" \
27+
"$@/repo/types/nightly/alias.lua" \
28+
"$@/"
29+
rm -rf "$@/repo"
1730

1831
.PHONY: clean
1932
clean:
20-
rm -rf .tests
33+
rm -rf .tests .dev
File renamed without changes.

0 commit comments

Comments
 (0)