-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvim installation instructions? #37
Comments
How using this parserAdd the following lines in your nvim config: local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
parser_config.asciidoc = {
install_info = {
url = 'https://github.com/cathaysia/tree-sitter-asciidoc.git',
files = { 'tree-sitter-asciidoc/src/parser.c', 'tree-sitter-asciidoc/src/scanner.c' },
branch = 'master',
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
}
parser_config.asciidoc_inline = {
install_info = {
url = 'https://github.com/cathaysia/tree-sitter-asciidoc.git',
files = { 'tree-sitter-asciidoc_inline/src/parser.c', 'tree-sitter-asciidoc_inline/src/scanner.c' },
branch = 'master',
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
}
Add the following line in your lazy.nvim config: {
'cathaysia/tree-sitter-asciidoc'
}, effectinstall with adoc and adoc_inline and query: only install adoc: don't install adoc: how do i check whether it worked??
open nvim and run
the color between |
IT WORKS IT WORKS!!! oh wow it's beeeeauuuutiful, thank you 😍 |
Important info (I think): it seems that you have to reinstall the parser after build = ":TSUpdate | TSInstall asciidoc asciidoc_inline query", The |
I just updated build = ":TSUpdate | TSInstall asciidoc asciidoc_inline", |
Hi! Thanks very much for sharing your hard work!
I'm keen to try this out in my nvim. I saw your (closed) PR trying to get this added to nvim-treesitter, so i tried to figure out what to do from that, and i've also looked up the treesitter docs on adding parsers and i'm hacking about trying to add your grammar to my nvim.
here's what i've got, in my
init.lua
:And then I had to run
:TSInstall asciidoc
, iirc.Questions:
config
block a good idea? (i'm using Lazy.nvim)tree-sitter-asciidoc_inline
, as opposed totree-sitter-asciidoc
(in thelocation=
bit) - is that a separate parser of some kind? what is it for? do i need to configure it as well / separately?And maybe the most important question:
thanks once againnnnnn
The text was updated successfully, but these errors were encountered: