Giter Site home page Giter Site logo

Comments (6)

smjonas avatar smjonas commented on July 17, 2024

Thanks for the report, could you share the definition for the frac snippet? If you are already at the last tabstop when pressing Tab, I don't think that this can be fixed since it then calls fallback() which is handled by nvim-cmp.

from cmp-nvim-ultisnips.

medwatt avatar medwatt commented on July 17, 2024

Thanks for the report, could you share the definition for the frac snippet? If you are already at the last tabstop when pressing Tab, I don't think that this can be fixed since it then calls fallback() which is handled by nvim-cmp.

context "math()"
snippet // "Fraction" iA
\\frac{$1}{$2}$0
endsnippet

from cmp-nvim-ultisnips.

jasonkena avatar jasonkena commented on July 17, 2024

@medwatt how did you manage to get the snippet to auto-expand with context "math()"? Adding the context is preventing me from expanding the snippet.

from cmp-nvim-ultisnips.

smjonas avatar smjonas commented on July 17, 2024

@jasonkena Until now, custom context snippets were not handled correctly. Now that I had time to add proper support for them, could you quickly test this feature? That would be awesome, I want to be sure I didn't break things! :) They should now only be shown when the custom context function returns True. Here is the PR: #72 (you can use my fork https://github.com/smjonas/cmp-nvim-ultisnips on the custom_context_snippets branch.

from cmp-nvim-ultisnips.

jasonkena avatar jasonkena commented on July 17, 2024

@smjonas unfortunately, it does not seem to work. On the main branch, I can at least see the snippet in the menu (still being unable to expand it), but using your fork, I can't. Any ideas?

from cmp-nvim-ultisnips.

smjonas avatar smjonas commented on July 17, 2024

Yeah sorry, this was a bit of a rushed attempt to implement this... I did test this with 2 custom snippets only and it seemed to work. I'll work on the feature when I have time. Thanks for testing though!

from cmp-nvim-ultisnips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.