Language basic completion

已查看 78 次
跳至第一个未读帖子

Lionel Zuber (Armaklan)

未读,
2015年8月17日 03:30:432015/8/17
收件人 light-table...@googlegroups.com
Hello,

The basic completion of LightTable propose word available in current editor. I search a way to "extend" it with an other file (for a specific syntax). The goal ? Provide a basic completion for some librairie or language.

Exactly, i want to do this : 

1. Make a listing in a file, like this : 

ng-app
ng-bind
ng-bind-html
...

2. Association this file to html syntax

3. When i type ng-a on a html file, LightTable suggest me "ng-app"


Any way to do this ?

Thx
Lionel Zuber.

Magnus Rundberget

未读,
2015年8月17日 05:46:012015/8/17
收件人 Light Table Discussion
I'm not aware of anything that does this out of the box

...but you might get pretty far with https://github.com/rundis/lt-snippets
In addition to autocompletion support you can parameterize things too

cheers
Magnus

Lionel Zuber (Armaklan)

未读,
2015年8月17日 06:17:162015/8/17
收件人 light-table...@googlegroups.com
Thanks for your answer.

I had considered this possibility too, but I wondered if there was not a way of doing lighter (even if this requires some plugin lines).

--
You received this message because you are subscribed to the Google Groups "Light Table Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to light-table-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Magnus Rundberget

未读,
2015年8月17日 07:02:232015/8/17
收件人 Light Table Discussion
Well, you could do a plugin (or add to your user plugin for starters) a behaviour like:
https://github.com/rundis/lt-snippets/blob/master/src/lt/plugins/snippets.cljs#L99

You could check the editor-tag(s) for language and read (possibly cached) appropriate hints to concat

cheers
Magnus
To unsubscribe from this group and stop receiving emails from it, send an email to light-table-discussion+unsub...@googlegroups.com.
回复全部
回复作者
转发
0 个新帖子