4 releases

0.0.4 Jun 16, 2024
0.0.3 Jun 8, 2024
0.0.2 Jun 8, 2024
0.0.1 Jun 8, 2024

#115 in Text editors

Download history 238/week @ 2024-06-03 113/week @ 2024-06-10 44/week @ 2024-06-17

395 downloads per month

Apache-2.0

1.5MB
60K SLoC

C 59K SLoC // 0.0% comments JavaScript 371 SLoC Scheme 179 SLoC Rust 30 SLoC // 0.3% 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:

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.7–4MB
~71K SLoC