tree-sitter-loongdoc

Crates.iotree-sitter-loongdoc
lib.rstree-sitter-loongdoc
version0.2.0
sourcesrc
created_at2024-06-08 03:03:17.332456
updated_at2024-08-02 13:51:36.11526
descriptionloongdoc grammar for tree-sitter
homepage
repositoryhttps://github.com/cathaysia/tree-sitter-loongdoc
max_upload_size
id1265385
size1,641,518
loongtao.zhang (cathaysia)

documentation

README

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,
    },
}
Commit count: 205

cargo fmt