Giter VIP home page Giter VIP logo

ultisnips_to_luasnip's Introduction

Sample

This tool depends on lark for parsing. It can be installed with pip install lark.

See test.snippets for the original snippets.

s(
        {trig="bye", dscr="My mail signature"},
        {
                t({ 'Good bye, Sir. Hope to talk to you soon.', '- Arthur, King of Britain' })
        }
),
s(
        {trig="match", dscr="Structural pattern matching"},
        {
                t('match '),
                i(1, 'expression'),
                t({ ':', '    case ' }),
                i(2, 'pattern_1'),
                t({ ':', '        ' }),
                i(3, 'pass'),
                t({ '', '    case ' }),
                i(4, 'pattern_2'),
                t({ ':', '        ' }),
                i(0, 'pass')
        }
),
s(
        {trig="cc", dscr="deep nesting", snippetType="autosnippet"},
        {
                t('C'),
                i(1),
                t(' '),
                i(2, 'N+'),
                t(' '),
                i(3, 'N-'),
                t(' '),
                i(4, 'value'),
                c(5, { sn(nil, { t(' '), i(1, 'a_1'), t(' '), i(2, 'a_2'), c(3, { sn(nil, { t(' '), i(1, 'deep') } ), t('') } ) } ), t('') } )
        }
),
s(
        {trig="q"},
        {
                t('Your age: '),
                c(1, { t('<18'), t('18~60'), t('>60') }),
                t({ '', 'Your height: ' }),
                c(2, { t('<120cm'), t('120cm~180cm'), t('>180cm') })
        }
),
s(
        {trig="dint", dscr="definit integral", snippetType="autosnippet", priority=300},
        {
                t('\\int_{'),
                i(1, '-\\infty'),
                t('}^{'),
                i(2, '\\infty'),
                t('} '),
                i(3, 'integrand'),
                t(' {\\mathrm{d} '),
                i(4, 'x'),
                t('}')
        },

        { condition = math }
),

ultisnips_to_luasnip's People

Contributors

medwatt avatar

Stargazers

Philipp Schmitt avatar Khalid H. Ahmed avatar

Watchers

 avatar

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.