6 releases

0.3.1 Aug 4, 2024
0.3.0 Aug 2, 2024
0.1.0 Jul 20, 2024
0.0.4 Jun 16, 2024

#2598 in Parser implementations

Download history 12/week @ 2024-07-23 194/week @ 2024-07-30 30/week @ 2024-08-06 4/week @ 2024-09-10 1/week @ 2024-09-17 12/week @ 2024-09-24 16/week @ 2024-10-01

407 downloads per month

Apache-2.0

1.5MB
42K SLoC

C 41K SLoC // 0.0% comments JavaScript 254 SLoC // 0.0% comments Scheme 151 SLoC Rust 33 SLoC // 0.2% comments

tree-sitter-loongdoc

LoongDoc is normalized asciidoc. LoongDocs make BEST EFFORT to keep compatibility with asciidoc.

This repo contains:

  • tree-sitter-loongdoc for parse blocks.
  • tree-sitter-loongdoc_inline for parse inline grammar.
  • loongdoc: a wrapper to provide a rust ast. [WIP]

There two website for this repo:

Usage

add the following lines to your tree-sitter configuration:

Add this repo to your lazy.nvim config:

{
    'cathaysia/tree-sitter-loongdoc',
},
vim.filetype.add({
    extension = {
        adoc = 'loongdoc'
    },
})

local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
parser_config.loongdoc = {
    install_info = {
        url = 'https://github.com/cathaysia/tree-sitter-loongdoc.git',
        files = { 'tree-sitter-loongdoc/src/parser.c', 'tree-sitter-loongdoc/src/scanner.c' },
        branch = 'master',
        generate_requires_npm = false,
        requires_generate_from_grammar = false,
    },
}
parser_config.loongdoc_inline = {
    install_info = {
        url = 'https://github.com/cathaysia/tree-sitter-loongdoc.git',
        files = { 'tree-sitter-loongdoc_inline/src/parser.c', 'tree-sitter-loongdoc_inline/src/scanner.c' },
        branch = 'master',
        generate_requires_npm = false,
        requires_generate_from_grammar = false,
    },
}

Dependencies

~2.9–4MB
~79K SLoC