nvim-treesitter-context/Makefile

40 lines
927 B
Makefile
Raw Permalink Normal View History

2022-06-18 07:38:58 +02:00
.DEFAULT_GOAL := test
2024-07-02 17:12:40 +02:00
NEOVIM_VERSION ?= v0.9.5
NEOVIM_RUNNER_VERSION ?= v0.10.0
2022-06-18 07:38:58 +02:00
NVIM_TS_SHA ?= ba921c9a
2022-06-18 07:38:58 +02:00
FILTER=.*
2022-06-18 07:38:58 +02:00
2024-06-27 18:31:37 +02:00
export XDG_DATA_HOME ?= $(HOME)/.data
2022-06-18 07:38:58 +02:00
nvim-treesitter:
git clone \
--filter=blob:none \
https://github.com/nvim-treesitter/nvim-treesitter
cd nvim-treesitter && git checkout $(NVIM_TS_SHA)
2022-06-18 07:38:58 +02:00
nvim-test:
git clone https://github.com/lewis6991/nvim-test
2024-07-02 17:12:40 +02:00
nvim-test/bin/nvim-test --init \
--runner_version $(NEOVIM_RUNNER_VERSION) \
2024-06-27 18:30:24 +02:00
--target_version $(NEOVIM_VERSION)
2023-05-17 11:07:51 +02:00
2022-06-18 07:38:58 +02:00
.PHONY: test
test: nvim-test nvim-treesitter
nvim-test/bin/nvim-test test \
2024-07-02 17:12:40 +02:00
--runner_version $(NEOVIM_RUNNER_VERSION) \
--target_version $(NEOVIM_VERSION) \
2022-06-18 07:38:58 +02:00
--lpath=$(PWD)/lua/?.lua \
2024-07-02 11:22:03 +02:00
--filter="$(FILTER)" \
--verbose
2024-06-27 18:30:24 +02:00
.PHONY: parsers
2024-06-27 18:32:48 +02:00
parsers: nvim-test nvim-treesitter
2024-07-02 17:12:40 +02:00
$(XDG_DATA_HOME)/nvim-test/nvim-runner-$(NEOVIM_RUNNER_VERSION)/bin/nvim \
2024-06-27 18:30:24 +02:00
--clean -u NONE -c 'source install_parsers.lua'
lint:
luacheck lua