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
kakoune: support for adding plugins #61385
Conversation
rebased... bump |
Does this rebuild kakoune when adding plugins (seems to change buildInputs) ? if that's the case maybe use a wrapper like neovim/neovim-unwrapped, if not ignore my comment. when that's addressed ping kakune's maintainer. |
f06bce5
to
2e24524
Compare
OK, I've updated this with the unwrapped/wrapper method. It's kind of nice, and makes fewer changes. @vrthra thoughts? |
Hey, no response from @vrthra for 19 days. I think this is a pretty nice solution now, so will someone else review? Thanks. |
ae35842
to
dead214
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took me so long to look at this. Meant to ages ago.
Anyway, looks great from here, save from a doc tweak.
Motivation: There is a thriving plugin ecosystem for Kakoune now, and it is nice to add these in our Nix configurations. This was modeled on neovim's plugins. parinfer-rust is useable both standalone and as a Kakoune plugin, so the plugin file inherits the same definition as pkgs. I'll make PRs for other plugins if this gets accepted. [Here](https://github.com/eraserhd/nixpkgs/tree/kak-ansi)'s a tested branch for the `kak-ansi` plugin.
dead214
to
2a91145
Compare
@alyssais I'm assuming you meant "space tweak" not "doc tweak" (or I'm missing something?), but this should be ready now. Thanks |
Err… yes |
Thank you! |
@eraserhd Thanks for adding support for kakoune plugins! I'm trying to use this feature but I'm running into an issue: plugins are sourced after one's The source of the problem seems to be the wrapper script, that runs IIUC, the idea was to avoid rebuilding kakoune when the selected plugins change; could this be achieved in some other way? E.g. by using symlinks to the outputs of |
@jcpetruzza Hi! Yeah, I've noticed this also, after several weeks (or months?) of using it. The problem is that there isn't a way to tell Kakoune to use a different runtime directory. If there was, then the wrapper could easily symlink all the original runtime plus plugins into a new runtime, and wrap So, it could be done in two parts, I think: A PR to kakoune to use Want to try it? If not, I'll put it on my to-do list, but I'm quite backlogged, so no telling when I will get to it. |
I think I got it working in nixpkgs in #91792; the tldr is that we can let nixpkgs make symlinks to everything (kakoune and the plug-ins), and just copy the kak binary, needed for path resolution. The PR is still waiting for review, though... |
Motivation for this change
There is a thriving plugin ecosystem for Kakoune now, and it is nice
to add these in our Nix configurations. This was modeled after weechat's
plugins.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)No binary files to test
Closure size: Before: 41,022,312, After: 41,022,312
Notes
parinfer-rust is useable both standalone and as a Kakoune plugin,
so the plugin file inherits the same definition as pkgs.
I'll make PRs for other plugins if this gets accepted.
Here's a tested
branch for the
kak-ansi
plugin.