nwolverson / purescript-ide-purescript-core

Deprecated, to be deleted
MIT License
11 stars 1 forks source link

Unicode symbol completion #4

Closed texastoland closed 6 years ago

texastoland commented 8 years ago

Random idea to suggest completions for the set of non-keyboard symbols defined in the parser?

nwolverson commented 8 years ago

YM replacing -> with , forall with ?

texastoland commented 8 years ago

Also , , , , and λ (not merged with purescript/purescript#1847). See https://github.com/purescript/purescript/blob/master/examples/passing/UnicodeType.purs.

garyb commented 8 years ago

I use Atom snippets to do this, I prefer that to having them autocomplete without me choosing whether I want them or not. When I was using Sublime I had it up to do it automatically, but found it annoying.

From my snippets.cson:

'.source.purescript':

  'Function arrow':
    'prefix': '->'
    'body': '→'

  'Do arrow':
    'prefix': '<-'
    'body': '←'

  'Constraint arrow':
    'prefix': '=>'
    'body': '⇒'

  'Implies arrow':
    'prefix': '<='
    'body': '⇐'

  'Type annotation':
    'prefix': '::'
    'body': '∷'

  'Forall':
    'prefix': 'forall'
    'body': '∀'
nwolverson commented 8 years ago

Code also supports user snippets:

https://code.visualstudio.com/docs/customization/userdefinedsnippets#_creating-your-own-snippets

We can add these to the plugins, but that will make them appear regardless of preference (at least the usual way).

texastoland commented 8 years ago

That does make more sense. I'll raise a ticket about API.

nwolverson commented 6 years ago

Closing due to consensus (ie gary). This could easily be a standalone extension if someone wants it.