-- Entry point for the SiSU spine markup Neovim integration. -- -- Registers a tree-sitter parser config so users can run -- :TSInstall sisu -- to fetch and build the parser via nvim-treesitter. -- -- The parser source lives can be found under the -- `projects/` namespace on git.sisudoc.org. local M = {} --- Register the `sisu` parser with nvim-treesitter and ensure that --- `.sst` / `.ssm` / `.ssi` are detected as filetype "sisu". --- --- Call once from your init.lua before invoking `:TSInstall sisu`. function M.setup() local ok, parsers = pcall(require, "nvim-treesitter.parsers") if not ok then vim.notify( "sisu-spine: nvim-treesitter is not installed; " .. "syntax highlighting will not be available.", vim.log.levels.WARN ) return end local parser_config = parsers.get_parser_configs() parser_config.sisu = { install_info = { url = "https://git.sisudoc.org/projects/tree-sitter-sisu", files = { "src/parser.c", "src/scanner.c", }, branch = "main", generate_requires_npm = false, requires_generate_from_grammar = false, }, filetype = "sisu", } end return M