feat(nvim): make "imp" snippet smarter
feat(nvim): make "imp" snippet smarter

As I've been thinking about how to make "import" vs "import type"
statements easier to work with, I've had three main options in mind:

1. Use LuaSnip choice nodes to select between type and non-type modes.
   This is hard to make feel right, as I am not sure what to bind it to:
   a new key, or should I overload the already heavily-overloaded Tab
   key?

2. Make two snippets, "imp" and "impt" to embody the two variants. This
   is definitely the simplest way.

3. Do what I'm doing in this commit: make the snippet "smarter", such
   that it looks at what you type and decides what to expand to:

    | Typing...              | expands to...                      |
    | ---------------------- | ---------------------------------- |
    | import type {foo}      | import type {foo} from 'foo';      |
    | import type {foo       | import type {foo from 'foo';       |
    | import type {foo,      | import type {foo, from 'foo';      |
    | import type {foo, bar} | import type {foo, bar} from 'foo'; |
    | import foo             | import foo from 'foo';             |
    | import {foo}           | import {foo} from 'foo';           |
    | import {foo            | import {foo from 'foo';            |
    | import {foo, bar}      | import {foo, bar} from 'foo';      |

Note those incomplete entries in there are intentional, as in as you
successively type characters you see the completion build up:

    import t          → import t from 't';
    import ty         → import ty from 'ty';
    import typ        → import typ from 'typ';
    import type       → import type from 'type';
    import type {     → import type { from 'type';
    import type {a    → import type {a from 'a';
    import type {a,   → import type {a, from 'a';
    ...etc

Will take this for a test drive and see if I like it.

wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent