Skip to content

Commit 0ee659f

Browse files
chore: remove tree-sitter-http from dependencies
1 parent 2843889 commit 0ee659f

4 files changed

Lines changed: 10 additions & 1 deletion

File tree

Makefile

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

1010
test:
11+
LUA_PATH="$(shell luarocks path --lr-path --lua-version 5.1 --local)" \
12+
LUA_CPATH="$(shell luarocks path --lr-cpath --lua-version 5.1 --local)" \
13+
luarocks install --local --lua-version 5.1 --dev tree-sitter-http
1114
LUA_PATH="$(shell luarocks path --lr-path --lua-version 5.1 --local)" \
1215
LUA_CPATH="$(shell luarocks path --lr-cpath --lua-version 5.1 --local)" \
1316
luarocks test --local --lua-version 5.1 --dev

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@ CLI.
4848
### Dependencies
4949

5050
- `curl`
51+
- [tree-sitter-http] (`scm` version)
5152

5253
### [rocks.nvim](https://github.com/nvim-neorocks/rocks.nvim) (recommended)
5354

5455
```vim
5556
:Rocks install rest.nvim
57+
:Rocks install tree-sitter-http dev
5658
```
5759

5860
### [lazy.nvim](https://github.com/folke/lazy.nvim)
@@ -63,6 +65,9 @@ CLI.
6365
}
6466
```
6567

68+
> [!NOTE]
69+
> you also need to install latest [tree-sitter-http] parser
70+
6671
<!-- TODO: I'm not sure packer supporst tree-sitter installation via luarocks -->
6772
<!-- ### [packer.nvim](https://github.com/wbthomason/packer.nvim) -->
6873
<!---->
@@ -312,3 +317,4 @@ test runner through `make test` will automatically install all required dependen
312317
rest.nvim is [GPLv3 Licensed](./LICENSE).
313318

314319
[tree-sitter]: https://github.com/tree-sitter/tree-sitter
320+
[tree-sitter-http]: https://github.com/rest-nvim/tree-sitter-http

rest.nvim-scm-1.rockspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ dependencies = {
2020
"mimetypes",
2121
"xml2lua",
2222
"fidget.nvim",
23-
"tree-sitter-http >= scm",
2423
}
2524

2625
test_dependencies = {

spec/minimum_init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ 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()
56
vim.treesitter.language.add("http", { path = vim.fs.normalize("~/.luarocks/lib/lua/5.1/parser/http.so") })
67
if not vim.treesitter.language.get_lang("http") then
78
vim.treesitter.language.register("http", "http")

0 commit comments

Comments
 (0)