Closed DrKGD closed 2 months ago
If you mean that after you installed queries, it still doesn't highlight. You can try using TSToggle highlight
twice. This is because when nvim-treesitter is loaded, it determines whether highlighting is supported based on the file name.
If you don't want to run TSToggle highlight
manually, you will need to change asciidoc to loongdoc.
Mh, I was more reporting the steps to use the plugin as of right now which works for me and also asking if there was a better way to install highlights, I suppose there really isn't :laughing:
Apologies that I couldn't make it more clear :disappointed:
It does indeed work and pretty well too!
Yes. I don't have any better ideas. :(
Is this what you want?
Yes, tysm!
I had some trouble configuring the highlights as it does not install them (highlights.scm is missing); this is not really a github issue, but here's my solution.
My understanding of it is that nvim-tree should have a copy of
highlights.scm
in the queries folder, which is not yet the case.As suggested on this very repository, I installed both but I selected the possibly trademarked name as the filetype, thus keeping the original asciidoctor
ftplugin
as fallback.Thus I cloned this repository as a standalone plugin, as a nvim-treesitter dependency (using
lazy
).As treesitter only automatically accepts
queries/{language}/{highlights.scm}
and such as reported here, I symlink'd the respective queries directories to$HOME/.local/share/nvim/rtp/queries/{lang}
, thus I added the path to the nvim runtimepath.Also, I tried using this local clone to automatically build the parsers on startup with
ensure_installed
(install_info also accepts a local url), but asloongdoc
andloongdoc_inline
shares the same working directory, they conflict with each other during the build phase.One last thing, thanks a lot for your work and for the parser of course!