-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also run the tests with tree-sitter highlighting enabled.
- Loading branch information
Showing
5 changed files
with
175 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
neovim-* | ||
nvim-test | ||
nvim-treesitter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,29 @@ | ||
.DEFAULT_GOAL := test | ||
|
||
NEOVIM_BRANCH := v0.9.5 | ||
NEOVIM_VERSION := 0.9.5 | ||
|
||
FILTER=.* | ||
|
||
NEOVIM := neovim-$(NEOVIM_BRANCH) | ||
NVIM_TS_SHA := 883c72cd | ||
|
||
.PHONY: neovim | ||
neovim: $(NEOVIM) | ||
|
||
$(NEOVIM): | ||
git clone --depth 1 https://github.com/neovim/neovim --branch $(NEOVIM_BRANCH) $@ | ||
make -C $@ | ||
FILTER=.* | ||
|
||
nvim-treesitter: | ||
git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter | ||
git clone \ | ||
--filter=blob:none \ | ||
https://github.com/nvim-treesitter/nvim-treesitter | ||
cd nvim-treesitter && git checkout $(NVIM_TS_SHA) | ||
|
||
nvim-treesitter/parser/%.so: nvim-treesitter $(NEOVIM) | ||
$(RM) -r $@ | ||
VIMRUNTIME=$(NEOVIM)/runtime $(NEOVIM)/build/bin/nvim \ | ||
--headless \ | ||
--clean \ | ||
--cmd 'set rtp+=./nvim-treesitter' \ | ||
-c "TSInstallSync $*" \ | ||
-c "q" | ||
|
||
export VIMRUNTIME=$(PWD)/$(NEOVIM)/runtime | ||
|
||
BUSTED = $$( [ -f $(NEOVIM)/test/busted_runner.lua ] \ | ||
&& echo "$(NEOVIM)/build/bin/nvim -ll $(NEOVIM)/test/busted_runner.lua" \ | ||
|| echo "$(NEOVIM)/.deps/usr/bin/busted" ) | ||
nvim-test: | ||
git clone https://github.com/lewis6991/nvim-test | ||
nvim-test/bin/nvim-test --init | ||
|
||
.PHONY: test | ||
test: $(NEOVIM) nvim-treesitter \ | ||
nvim-treesitter/parser/cpp.so \ | ||
nvim-treesitter/parser/lua.so \ | ||
nvim-treesitter/parser/rust.so \ | ||
nvim-treesitter/parser/typescript.so | ||
$(BUSTED) \ | ||
-v \ | ||
--lazy \ | ||
--helper=$(PWD)/test/preload.lua \ | ||
--output test.busted.outputHandlers.nvim \ | ||
--lpath=$(PWD)/$(NEOVIM)/?.lua \ | ||
--lpath=$(PWD)/$(NEOVIM)/build/?.lua \ | ||
--lpath=$(PWD)/$(NEOVIM)/runtime/lua/?.lua \ | ||
--lpath=$(PWD)/nvim-treesitter/lua/?.lua \ | ||
--lpath=$(PWD)/?.lua \ | ||
test: nvim-test nvim-treesitter | ||
nvim-test/bin/nvim-test test \ | ||
--runner_version $(NEOVIM_VERSION) \ | ||
--target_version $(NEOVIM_VERSION) \ | ||
--lpath=$(PWD)/lua/?.lua \ | ||
--filter=$(FILTER) \ | ||
$(PWD)/test | ||
|
||
-@stty sane | ||
--verbose | ||
|
||
lint: | ||
luacheck lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.