rundis / lt-snippets

Snippets/templates support for Light Table
MIT License
12 stars 4 forks source link

Snippets get lost in autocomplete #20

Open tomak-git opened 9 years ago

tomak-git commented 9 years ago

Currently, snippets get quickly drowned in other autocomplete suggestions as the file grows longer. Sometimes, they are not present at all in autocomplete even though I hit tab exactly after the pattern that should trigger a snippet. Snippets should not get lost in this way. Moreover, I whink it would be great to have an option to allow snippets to always take precedence over other autocomplete suggestions, that is, to have snippets always at the top in autocomplete. Cheers,

Tom

rundis commented 9 years ago
  1. Drowning: I'm just using the hinter plugin shipping with LT. This implements a fuzzy sort i have very little control over. Maybe possible to ovverride the default fuzzy thing, not sure,
  2. Not autocompleting. I've seen this happen in another plugin too, might be an lt hinter problem... or me having missed something in it's usage. I have a feeling it's the text suggestions interfering with the snippet suggestions. The hinter aggressively caches text/words entered in editors... You could always try and turn of the text hinting behavior in Lt and see if that helps :) if not feel free to report back preferably with something reproducable

Cheers M.

Trapets commented 9 years ago

If there is a some variable name, string, comment etc in the file with the same name as the snippet key, snippet won't show up in autocomplete resultlist.

rundis commented 8 years ago

If you turn of textual hinting, this shouldn't be a problem

So for whatever edtitors you use snippets and can happily live without textual hints just add something like this to your user behaviors file:


   ; for each editor type add an entry like this
   [:editor.javascript :-lt.plugins.auto-complete/textual-hints] ; 

  ; or to turn of textual hinting for all editor types
  ; [:editor :-lt.plugins.auto-complete/textual-hints] ;