tree-sitter-strudel
v1.1.8
Published
Parser for Strudel, a Tidal Cycles base live coding tool
Maintainers
Readme
tree-sitter-strdl
Tree-sitter parser for Strudel, a Tidal Cycles based live coding tool.
Usage
To install the parser in Neovim:
- Create a file
strudel-integration.luain your~/.config/nvim/lua/directory:
---@class ParserConfig
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.strudel = {
install_info = {
-- url = "https://github.com/pedrozappa/tree-sitter-strdl", -- local path or git repo
url = "~/tree-sitter-strdl/", -- local path to this repo
files = { "src/parser.c" }, -- note that some parsers also require src/scanner.c or src/scanner.cc
-- optional entries:
branch = "main", -- default branch in case of git repo if different from master
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
},
filetype = "strdl", -- if filetype does not match the parser name
}
vim.api.nvim_create_autocmd("BufRead", {
pattern = { "*.strdl", "*.strudel" },
callback = function()
vim.bo.filetype = "strdl"
end,
})- On your
~/.config/nvim/init.lua:
require("strudel-integration")Run the following to install the parsers schemas:
npm run local_install