From 25aa98c30c1d36afa147cf5e316f58f19d7b884d Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Thu, 15 Dec 2022 21:09:56 +0100 Subject: [PATCH] feat: add rockspec nvim-treesitter is a common dependency across Neovim plugins. Using luarocks may alleviate the need for users to specify their plugins' dependencies in their plugin manager. (e.g., vim-plug or packer). See also: https://teto.github.io/posts/2021-09-17-neovim-plugin-luarocks.html NOTE: If this is merged, a package on www.luarocks.org will need to be added, which can be done from only one account. See luarocks/luarocks-site#173. --- nvim_treesitter-scm-1.rockspec | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 nvim_treesitter-scm-1.rockspec diff --git a/nvim_treesitter-scm-1.rockspec b/nvim_treesitter-scm-1.rockspec new file mode 100644 index 000000000000..8178d903241d --- /dev/null +++ b/nvim_treesitter-scm-1.rockspec @@ -0,0 +1,38 @@ +local _MODREV, _SPECREV = 'scm', '-1' + +rockspec_format = "3.0" +package = 'nvim_treesitter' +version = _MODREV .. _SPECREV + +description = { + summary = 'A framework for interacting with tests within NeoVim.', + detailed = [[ + The goal of nvim-treesitter is both to provide a simple and easy way to use the interface + for tree-sitter in Neovim and to provide some basic functionality such as highlighting based on it. + ]], + homepage = 'https://github.com/nvim-treesitter/nvim-treesitter', + license = 'MIT', + labels = { 'neovim', 'tree-sitter', } +} + +dependencies = { + 'lua == 5.1', +} + +source = { + url = 'https://github.com/nvim-treesitter/nvim-treesitter/archive/v' .. _MODREV .. '.zip', + dir = 'nvim-treesitter-' .. _MODREV, +} + +if _MODREV == 'scm' then + source = { + url = 'git://github.com/nvim-treesitter/nvim-treesitter', + } +end + +build = { + type = 'builtin', + copy_directories = { + 'doc' + } +}