Kakoune: Difference between revisions
imported>Nix m add Software/Applications subcategory |
imported>Tobias.bora Add info about plugins |
||
Line 25: | Line 25: | ||
User configuration can simply be added as a plugin as above. | User configuration can simply be added as a plugin as above. | ||
== Plugins == | |||
To install a plugin, you can either install it manually without bothering about nix, or install it as shown above in an override like: | |||
<syntaxhighlight lang="nix> | |||
let | |||
myKakoune = kakoune.override { | |||
plugins = with kakounePlugins; [ parinfer-rust ]; | |||
}; | |||
in | |||
{ | |||
environment.systemPackages = [ myKakoune ]; | |||
} | |||
</syntaxhighlight> | |||
You should be able to search through the list of plugins using for instance nix search (if you don't have flake enabled you may need to add <code>--experimental-features 'nix-command flakes'</code> in front of the nix command) : | |||
<syntaxhighlight> | |||
$ nix search nixpkgs parinfer | |||
… | |||
* legacyPackages.x86_64-linux.kakounePlugins.parinfer-rust (0.4.3) | |||
Infer parentheses for Clojure, Lisp, and Scheme | |||
</syntaxhighlight> | |||
If your plugin is not listed, you can add it manually using <code>pkgs.kakouneUtils.buildKakounePluginFrom2Nix</code>: | |||
<syntaxhighlight lang="nix> | |||
let | |||
myKakoune = | |||
let | |||
snippets-kak = pkgs.kakouneUtils.buildKakounePluginFrom2Nix { | |||
pname = "snippets-kak"; | |||
version = "2021-07-18"; | |||
src = pkgs.fetchFromGitHub { | |||
owner = "occivink"; | |||
repo = "kakoune-snippets"; | |||
rev = "c0c39eda2e8f9608cbc0372583bf76441a24afd9"; | |||
sha256 = "12q32ahxvmi82f8jlx24xpd61vlnqf14y78ahj1381rv61a386mv"; | |||
}; | |||
meta.homepage = "https://github.com/occivink/kakoune-snippets/"; | |||
}; | |||
in | |||
kakoune.override { | |||
plugins = with kakounePlugins; [ parinfer-rust snippets-kak ]; | |||
}; | |||
in | |||
{ | |||
environment.systemPackages = [ myKakoune ]; | |||
} | |||
</syntaxhighlight> | |||
[[Category:Applications]] | [[Category:Applications]] |