File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
plugins/by-name/friendly-snippets Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
3+ config ,
4+ options ,
35 ...
46} :
57lib . nixvim . plugins . mkVimPlugin {
@@ -9,6 +11,30 @@ lib.nixvim.plugins.mkVimPlugin {
911 maintainers = [ lib . maintainers . GaetanLepage ] ;
1012
1113 extraConfig = {
14+ warnings = lib . nixvim . mkWarnings "plugins.friendly-snippets" (
15+ let
16+ snippetConsumers = map ( lib . splitString "." ) [
17+ "plugins.luasnip.enable"
18+ "plugins.cmp.enable"
19+ "plugins.blink-cmp.enable"
20+ "plugins.nvim-snippets.enable"
21+ ] ;
22+ enabledConsumers = builtins . filter ( path : lib . getAttrFromPath path config ) snippetConsumers ;
23+ enabledConsumersPretty = lib . concatMapStringsSep ", " (
24+ path : lib . getAttrFromPath path options
25+ ) enabledConsumers ;
26+ in
27+ {
28+ when =
29+ config . performance . combinePlugins . enable
30+ && ! ( builtins . elem "friendly-snippets" config . performance . combinePlugins . standalonePlugins )
31+ && ( enabledConsumers != [ ] ) ;
32+ message = ''
33+ When using ${ options . performance . combinePlugins . enable } , ${ options . plugins . friendly-snippets . enable } and ${ enabledConsumersPretty } :
34+ "friendly-snippets" has to be added to ${ options . performance . combinePlugins . standalonePlugins } in order to be picked up by the aforementioned plugins.
35+ '' ;
36+ }
37+ ) ;
1238 # Simply add an element to the `fromVscode` list to trigger the import of friendly-snippets
1339 plugins . luasnip . fromVscode = [ { } ] ;
1440 } ;
You can’t perform that action at this time.
0 commit comments