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