mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/snippets: move to by-name
This commit is contained in:
parent
2a91b89445
commit
82e7d153e4
7 changed files with 0 additions and 4 deletions
60
plugins/by-name/nvim-snippets/default.nix
Normal file
60
plugins/by-name/nvim-snippets/default.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) types;
|
||||
inherit (lib.nixvim) defaultNullOpts;
|
||||
in
|
||||
lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||
name = "nvim-snippets";
|
||||
luaName = "snippets";
|
||||
|
||||
maintainers = [ lib.maintainers.psfloyd ];
|
||||
|
||||
settingsOptions = {
|
||||
create_autocmd = defaultNullOpts.mkBool false ''
|
||||
Optionally load all snippets when opening a file.
|
||||
Only needed if not using nvim-cmp.
|
||||
'';
|
||||
|
||||
create_cmp_source = defaultNullOpts.mkBool true ''
|
||||
Optionally create a nvim-cmp source.
|
||||
Source name will be snippets.
|
||||
'';
|
||||
|
||||
friendly_snippets = defaultNullOpts.mkBool false ''
|
||||
Set to true if using friendly-snippets.
|
||||
'';
|
||||
|
||||
ignored_filetypes = defaultNullOpts.mkListOf types.str null ''
|
||||
Filetypes to ignore when loading snippets.
|
||||
'';
|
||||
|
||||
extended_filetypes = defaultNullOpts.mkAttrsOf types.anything null ''
|
||||
Filetypes to load snippets for in addition to the default ones. ex: {typescript = {
|
||||
'javascript'}}'';
|
||||
|
||||
global_snippets = defaultNullOpts.mkListOf types.str [ "all" ] ''
|
||||
Snippets to load for all filetypes.
|
||||
'';
|
||||
|
||||
search_paths =
|
||||
defaultNullOpts.mkListOf types.str [ { __raw = "vim.fn.stdpath('config') .. '/snippets'"; } ]
|
||||
''
|
||||
Paths to search for snippets.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
create_autocmd = true;
|
||||
create_cmp_source = true;
|
||||
friendly_snippets = true;
|
||||
ignored_filetypes = [ "lua" ];
|
||||
extended_filetypes = {
|
||||
typescript = [ "javascript" ];
|
||||
};
|
||||
global_snippets = [ "all" ];
|
||||
search_paths = [ { __raw = "vim.fn.stdpath('config') .. '/snippets'"; } ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue