Skip to content

Commit 626868a

Browse files
test: don't install parser on every tests
1 parent 8c32934 commit 626868a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ format:
88
stylua .
99

1010
test:
11+
# TODO: install tree-sitter-http as a test dependency using nix
12+
# or version it appart from NURR
1113
LUA_PATH="$(shell luarocks path --lr-path --lua-version 5.1 --local)" \
1214
LUA_CPATH="$(shell luarocks path --lr-cpath --lua-version 5.1 --local)" \
1315
luarocks install --local --lua-version 5.1 --dev tree-sitter-http

spec/minimal_init.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ local test_dir = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h")
22
local rest_nvim_dir = vim.fn.fnamemodify(test_dir, ":h")
33

44
-- TODO: find `LUA_LIBDIR`
5-
vim.system({ "luarocks", "install", "--local", "--lua-version", "5.1", "--dev", "tree-sitter-http" }):wait()
65
vim.treesitter.language.add("http", { path = vim.fs.normalize("~/.luarocks/lib/lua/5.1/parser/http.so") })
7-
if not vim.treesitter.language.get_lang("http") then
8-
vim.treesitter.language.register("http", "http")
9-
end
6+
vim.treesitter.language.register("http", "http")
7+
vim.treesitter.language.register("http", "rest_nvim_result")
108
vim.opt.runtimepath:append(rest_nvim_dir)
119
vim.cmd("runtime! ftplugin.vim")
1210
vim.cmd("runtime! ftdetect/*.{vim,lua}")

0 commit comments

Comments
 (0)