Combine conditions of LuaSnip with the detection of loaded packages and surrounding environment of VimTeX #3178
                  
                    
                      kiryph
                    
                  
                
                  started this conversation in
                Show and tell
              
            Replies: 1 comment 2 replies
-
| 
         Thanks for sharing! I don't use Luasnip myself (I probably should, though). 😅  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If you want to create snippets for packages, e.g. for tkz-euclide with lengthy command names like
\tkzDrawSectorRwithNodesAngles, but do not want to pollute the completion menu in documents not using this package and outside of relevant environments (here tikz), you can do this the following way:Note
*meansand. See:h luasnip-extra-conditionsAt the moment this is only to show how to define the conditions. Defining the snippets is left to the user. But improvements are welcome.
Beta Was this translation helpful? Give feedback.
All reactions