mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/friendly-snippets: init
This commit is contained in:
parent
be2ed580e8
commit
86d6ce5029
3 changed files with 34 additions and 0 deletions
|
@ -88,6 +88,7 @@
|
||||||
|
|
||||||
./pluginmanagers/packer.nix
|
./pluginmanagers/packer.nix
|
||||||
|
|
||||||
|
./snippets/friendly-snippets.nix
|
||||||
./snippets/luasnip
|
./snippets/luasnip
|
||||||
|
|
||||||
./statuslines/airline.nix
|
./statuslines/airline.nix
|
||||||
|
|
25
plugins/snippets/friendly-snippets.nix
Normal file
25
plugins/snippets/friendly-snippets.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
helpers,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.plugins.friendly-snippets;
|
||||||
|
in {
|
||||||
|
meta.maintainers = [maintainers.GaetanLepage];
|
||||||
|
|
||||||
|
options.plugins.friendly-snippets = {
|
||||||
|
enable = mkEnableOption "friendly-snippets";
|
||||||
|
|
||||||
|
package = helpers.mkPackageOption "friendly-snippets" pkgs.vimPlugins.friendly-snippets;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
extraPlugins = [cfg.package];
|
||||||
|
|
||||||
|
# Simply add an element to the `fromVscode` list to trigger the import of friendly-snippets
|
||||||
|
plugins.luasnip.fromVscode = [{}];
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins = {
|
||||||
|
luasnip.enable = true;
|
||||||
|
friendly-snippets.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue