From 3fe837dccb16d9471788b7eb17d0920f6650944c Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sat, 10 Dec 2022 23:15:19 +0300 Subject: [PATCH] add install section for neovim to readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index b344e95..3d58d27 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,22 @@ References: ![screenshot](./assets/screenshot.png) + +# Install + +## Neovim + +Using `nvim-treesitter`, add to your configuration + +```lua +local parser_config = require("nvim-treesitter.parsers").get_parser_configs() +parser_config.d2 = { + install_info = { + url = 'https://github.com/pleshevskiy/tree-sitter-d2', + revision = 'main' + files = { 'src/parser.c', 'src/scanner.cc' }, + }, + filetype = 'd2', +}; +``` +