mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +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
|
||||
{
|
||||
imports =
|
||||
let
|
||||
basePluginPath = [
|
||||
"plugins"
|
||||
"luasnip"
|
||||
];
|
||||
in
|
||||
[
|
||||
# TODO introduced 2024-08-04. Remove after 24.11
|
||||
(lib.mkRenamedOptionModule (basePluginPath ++ [ "extraConfig" ]) (basePluginPath ++ [ "settings" ]))
|
||||
];
|
||||
|
||||
options.plugins.luasnip = {
|
||||
enable = mkEnableOption "luasnip";
|
||||
|
||||
package = helpers.mkPluginPackageOption "luasnip" pkgs.vimPlugins.luasnip;
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
settings = mkOption {
|
||||
type = with types; attrsOf anything;
|
||||
description = ''
|
||||
Extra config options for luasnip.
|
||||
|
||||
Example:
|
||||
{
|
||||
enable_autosnippets = true,
|
||||
store_selection_keys = "<Tab>",
|
||||
}
|
||||
Options provided to the `require('luasnip').config.setup()` function.",
|
||||
'';
|
||||
example = {
|
||||
enable_autosnippets = true;
|
||||
store_selection_keys = "<Tab>";
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
|
||||
|
@ -156,7 +166,7 @@ in
|
|||
];
|
||||
extraConfig = [
|
||||
''
|
||||
require("luasnip").config.set_config(${helpers.toLuaObject cfg.extraConfig})
|
||||
require("luasnip").config.setup(${helpers.toLuaObject cfg.settings})
|
||||
''
|
||||
];
|
||||
in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue