mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/luasnip: rename extraConfig to settings (more consistent with RFC-42)
This commit is contained in:
parent
6f7cf23b22
commit
25da1220ad
1 changed files with 20 additions and 10 deletions
|
@ -50,22 +50,32 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports =
|
||||||
|
let
|
||||||
|
basePluginPath = [
|
||||||
|
"plugins"
|
||||||
|
"luasnip"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
[
|
||||||
|
# TODO introduced 2024-08-04. Remove after 24.11
|
||||||
|
(lib.mkRenamedOptionModule (basePluginPath ++ [ "extraConfig" ]) (basePluginPath ++ [ "settings" ]))
|
||||||
|
];
|
||||||
|
|
||||||
options.plugins.luasnip = {
|
options.plugins.luasnip = {
|
||||||
enable = mkEnableOption "luasnip";
|
enable = mkEnableOption "luasnip";
|
||||||
|
|
||||||
package = helpers.mkPluginPackageOption "luasnip" pkgs.vimPlugins.luasnip;
|
package = helpers.mkPluginPackageOption "luasnip" pkgs.vimPlugins.luasnip;
|
||||||
|
|
||||||
extraConfig = mkOption {
|
settings = mkOption {
|
||||||
type = types.attrsOf types.anything;
|
type = with types; attrsOf anything;
|
||||||
description = ''
|
description = ''
|
||||||
Extra config options for luasnip.
|
Options provided to the `require('luasnip').config.setup()` function.",
|
||||||
|
|
||||||
Example:
|
|
||||||
{
|
|
||||||
enable_autosnippets = true,
|
|
||||||
store_selection_keys = "<Tab>",
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
|
example = {
|
||||||
|
enable_autosnippets = true;
|
||||||
|
store_selection_keys = "<Tab>";
|
||||||
|
};
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -156,7 +166,7 @@ in
|
||||||
];
|
];
|
||||||
extraConfig = [
|
extraConfig = [
|
||||||
''
|
''
|
||||||
require("luasnip").config.set_config(${helpers.toLuaObject cfg.extraConfig})
|
require("luasnip").config.setup(${helpers.toLuaObject cfg.settings})
|
||||||
''
|
''
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue