Skip to content

Treesitter grammar for markdoc for editors that support tree-sitter

License

Notifications You must be signed in to change notification settings

mohitsinghs/tree-sitter-markdoc

Repository files navigation

tree-sitter-markdoc

CI LICENSE

Markdoc grammar for tree-sitter


Using with Neovim

  1. Define a new filetype for markdoc.
vim.filetype.add({
  extension = {
    mdoc = "markdoc",
  },
})
  1. Add markdoc parser config in nvim-treesitter.
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.markdoc = {
  install_info = {
    url = "https://github.com/mohitsinghs/tree-sitter-markdoc",
    files = { "src/parser.c" },
    branch = "main",
   },
  filetype = "markdoc",
}
  1. Copy queries to ~/.config/nvim/queries/markdoc.

  2. Run :TSInstall markdoc

References

About

Treesitter grammar for markdoc for editors that support tree-sitter

Topics

Resources

License

Stars

Watchers

Forks