add install section for neovim to readme

This commit is contained in:
Dmitriy Pleshevskiy 2022-12-10 23:15:19 +03:00
parent 16d8b4c5f7
commit 3fe837dccb
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -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',
};
```