Skip to content

Commit

Permalink
plugins/luasnip: revert back to camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
HeitorAugustoLN committed Dec 16, 2024
1 parent 284dbbb commit 8cdbc9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
18 changes: 8 additions & 10 deletions plugins/by-name/luasnip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
};

extraOptions = {
from_vscode = mkOption {
fromVscode = mkOption {
type = types.listOf loaderSubmodule;
default = [ ];
example = lib.literalExpression ''
Expand All @@ -311,7 +311,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
'';
};

from_snipmate = mkOption {
fromSnipmate = mkOption {
default = [ ];
description = ''
Luasnip does not support the full snipmate format: Only
Expand All @@ -326,7 +326,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
type = types.listOf loaderSubmodule;
};

from_lua = mkOption {
fromLua = mkOption {
default = [ ];
description = ''
Load lua snippets with the lua loader.
Expand All @@ -343,7 +343,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
type = types.listOf loaderSubmodule;
};

filetype_extend = mkOption {
filetypeExtend = mkOption {
default = { };
type = with types; attrsOf (listOf str);
example = {
Expand All @@ -365,17 +365,15 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
};
};

imports = [ ./deprecations.nix ];

extraConfig =
cfg:
let
loaderConfig =
lib.pipe
{
vscode = cfg.from_vscode;
snipmate = cfg.from_snipmate;
lua = cfg.from_lua;
vscode = cfg.fromVscode;
snipmate = cfg.fromSnipmate;
lua = cfg.fromLua;
}
[
(lib.mapAttrsToList (name: loaders: map (loader: { inherit name loader; }) loaders))
Expand All @@ -398,7 +396,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {

filetypeExtendConfig = lib.mapAttrsToList (name: value: ''
require("luasnip").filetype_extend("${name}", ${toLuaObject value})
'') cfg.filetype_extend;
'') cfg.filetypeExtend;
in
{
extraLuaPackages = ps: [ ps.jsregexp ];
Expand Down
18 changes: 0 additions & 18 deletions plugins/by-name/luasnip/deprecations.nix

This file was deleted.

0 comments on commit 8cdbc9a

Please sign in to comment.