-
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
tree-sitter: add org grammar #145940
tree-sitter: add org grammar #145940
Conversation
excited about this but worried that it appears as an official "org" parser while it targets neovim in the description. |
@teto That's a good idea and I agree with you. However, when I tried it, I get an error in nvim that the 'org' parser could not be found. I don't know why and it seems strange because my understanding is that calling the parser org-nvim is purely a NixOS-thing (i.e. it boils down to a directory name and does not affect the generated parser). |
nvim-treesitter/nvim expects a parser with the filetype as name IIRC so you may need to check the installed shared library has the correct name. |
Yes, that's it. I was just confused because the output of the tree-sitter grammar is a file called Now this leaves us at the same problem as before: let's say someone comes up with another org parser and we'd like to use it in neovim as well. If we want to make orgmode.nvim work, we have to call the orgmode.nvim parser So I think if we want to use a different name for the org nvim parser, we either have to rename it upstream or patch orgmode.nvim. What do you think? Am I missing something? |
Conflicitng filenames can be solved in nix by setting priorities (look for lowPrio) for instance. So that's a non-issue. I mean even if you were not using nix, one would have to choose wich parser to use for org. |
This will soon be a dependency of orgmode.nvim. Currently, it is an optional dependency.
Alright, I think I have found a working solution, see my latest update. |
Closed by #154350? |
I'm going to close this as fixed by the above, feel free to reopen. |
There are likely to be several "org" grammars so suffixing them seems better in the long term see NixOS#145940 I haven't provided an alias since this grammar was introduced a few days ago only.
There are likely to be several "org" grammars so suffixing them seems better in the long term see #145940 I haven't provided an alias since this grammar was introduced a few days ago only.
this will soon be a dependency of orgmode.nvim; currently, it is an
optional dependency.
Motivation for this change
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)