Hello, I’m one of the core developers of Neorg, and I’m primarily focused on integrating a task management workflow called GTD (getting things done) in Neorg.
I already have created some views to nicely display tasks and projects, which are being fetched from different .norg (our custom filetype) buffers in some directory.
In the process of parsing the files to extract informations, I do these steps (for each file):
- Get file uri with
vim.uri_from_fname()
- Get buffer with
vim.uri_to_bufnr()
- Get the file AST with
vim.treesitter.get_parser(bufnr, "norg")
It seems that the get_parser function does open the buffer (in background), causing me to receive messages like these:
But more importantly, I’m worried for performance issues, because our plugin does some icon concealing when a buffer is opened.
Is it possible to get the AST without opening the buffers ?