#rush #parser #incremental

tree-sitter-rush

tree-sitter 解析库的 rush 语法

1 个不稳定版本

0.1.0 2023年7月6日

#483文本编辑器

Download history 18/week @ 2024-03-11 12/week @ 2024-03-18 33/week @ 2024-04-01 38/week @ 2024-04-15 1/week @ 2024-04-22 5/week @ 2024-05-27 4/week @ 2024-06-03 66/week @ 2024-06-10 18/week @ 2024-06-24

88 每月下载量
用于 syntastica-parsers

MIT 许可证

315KB
13K SLoC

C 12K SLoC JavaScript 264 SLoC Scheme 87 SLoC // 0.1% comments Rust 31 SLoC // 0.5% comments

tree-sitter-rush

rush 语法用于 tree-sitter

Neovim 中的使用

解析器安装

nvim-treesitter 插件 不包含此解析器。要使用它,您必须手动将其添加到您的 tree-sitter 配置中,然后使用 :TSInstall rush 或将其添加到您的 ensure_installed 列表中安装它

require('nvim-treesitter.parsers').get_parser_configs().rush = {
    install_info = {
        url = 'https://github.com/rush-rs/tree-sitter-rush.git',
        files = { 'src/parser.c' },
        branch = 'main',
    },
}

文件类型检测

您可能还需要添加 rush 文件类型

vim.filetype.add { extension = { rush = 'rush' } }

高亮显示和缩进

如果您想使用此解析器进行高亮显示和缩进,您还必须将其作为插件添加到此仓库,例如对于 packer.nvim,请添加以下内容

use { 'rush-rs/tree-sitter-rush' }

依赖项

~2.8–4MB
~72K SLoC