-
-
Notifications
You must be signed in to change notification settings - Fork 158
Support nvim-treesitter's parser_install_dir configuration #967
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
Comments
I'm trying to use this plugin but it fails to install the treesitter org parser. The nix store is read only so nvim-orgmode fails at the install. Allowing us to handle this dependency on our own would be great! Also I looked at what I think is the org parser but it is archived? Is this the current parser that is used by orgmode? |
This is the official parser being used: https://github.com/nvim-orgmode/tree-sitter-org/tree/next I'm not sure how nix works, so I'm open for suggestions, as long as it does not involve adding a dependency on nvim-treesitter. How are you installing other parsers? |
I've been installing tree-sitters parsers via nixpkgs; We don't have to use the nixpkgs repo though, we could build the parser as a flake output. Then anyone who wants to use the orgmode parser could bring it in as a flake input. They would handle the parser dependency on their own. Then we would set an environment variable for orgmode to look for. If it finds that environment variable it would use the parser at that location instead of attempting to install on its own. Or we could allow for a global variable to be set. I'm not good with Lua, working on learning it. I can try writing a flake.nix file for the tree-sitter-org repo. That would be the first step. |
I'm ok with using nixpkg. We probably need a github action to publish to nixpkg. Since I have no idea how it works, can you create a PR on https://github.com/nvim-orgmode/tree-sitter-org with the setup? You can follow luarocks release to figure out how to get necessary data for publishing, like version, etc. Once we do that, I'll figure out a way to handle this separately installed parser, since now I expect it to be installed in the orgmode/parser/ folder. Does that sound ok? |
That sounds great! I'll see if I can get that done today. I'm looking into norg's implementation and using it to see what a proper implementation looks like. |
Does this feature exist in Emacs orgmode core?
N/A
Orgmode link
No response
Feature value
Currently, the orgmode plugin always installs the org parser to its own package directory ([package_root]/parser/org.so). It would be beneficial to respect nvim-treesitter's parser_install_dir configuration when available, which would allow users to keep all parsers in a single consistent location. This is especially useful in setups where the plugin is being installed by nix.
Additional context
No response
The text was updated successfully, but these errors were encountered: