<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">So, I looked a bit at the grammar definition, and I really found nothing.<div class="">The selector line 248 appears to be fine :</div><div class=""><br class=""></div><div class=""><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>begin = '(?x)</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(?<=\() # preceded by (</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(define)\s+ # define</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(\() # list of parameters</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span> ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span> ((\s+</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span> ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span> )*</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span> )\s*</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(\))</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>';</font></div><div class=""><font face="FreeMono" class=""><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>end = '(?=\))';</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>captures = {</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>1 = { name = 'keyword.control.scheme'; };</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>2 = { name = 'punctuation.definition.function.scheme'; };</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>3 = { name = 'entity.name.function.scheme'; };</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>4 = { name = 'variable.parameter.function.scheme'; };</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>7 = { name = 'punctuation.definition.function.scheme'; };</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>};</div></font></div><div class=""><br class=""></div><div class="">It is strange, because further testing gives me that with the following code :</div><div class=""><br class=""></div><div class=""><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(define (abcd-e) 2)</font></div></div><div class=""><br class=""></div><div class="">when I type a and press [ESC], abcd is suggested.</div><div class=""><br class=""></div><div class="">I read some posts from the site (<a href="http://blog.macromates.com/2012/clever-completion/" class="">http://blog.macromates.com/2012/clever-completion/</a> and the corresponding manual sections), thus deducting that the variable scope affected the autocompletion and tested it by modifying the Scheme bundle to enable € in a variable name (I'm French ya know).</div><div class="">To do that, I just modified the following code : (lines 303-315 of the grammar)</div><div class=""><br class=""></div><div class=""><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>{<span class="Apple-tab-span" style="white-space:pre"> </span>name = 'meta.declaration.variable.scheme';</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>begin = '(?<=\()(define)\s([[:alnum:]][[:alnum:]<font color="#ff2600" class="">€</font>!$%&*+-./:<=>?@^_~]*)\s*.*?';</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>end = '(?=\))';</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>captures = {</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>1 = { name = 'keyword.control.scheme'; };</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>2 = { name = 'variable.other.scheme'; };</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>};</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>patterns = (</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>{<span class="Apple-tab-span" style="white-space:pre"> </span>include = '#comment'; },</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>{<span class="Apple-tab-span" style="white-space:pre"> </span>include = '#sexp'; },</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>{<span class="Apple-tab-span" style="white-space:pre"> </span>include = '#illegal'; },</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>);</font></div><div class=""><font face="FreeMono" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>},</font></div></div><div class=""><font face="FreeMono" class=""><br class=""></font></div><div class="">And it worked !</div><div class=""><br class=""></div><div class="">If I type :</div><div class=""><font face="FreeMono" class="">(define ab-cd€ 23)</font></div><div class=""><font face="FreeMono" class="">ab</font></div><div class="">And press [esc], then the whole name appears. Nevertheless, if I try with <font face="FreeMono" class="">ab-</font>, then the completion doesn't trigger. So far I experienced, I works only after alphanumeric characters.</div><div class=""><br class=""></div><div class="">Thus, there are two strange behaviours :</div><div class=""><br class=""></div><div class="">1. The entity scopes don't seem to affect autocompletion. Then, what is the recommended manner to solve my main issue ? Can I capture the function name in both selectors (entity and variable) ?</div><div class="">2. Why can't the autocompletion be triggered after a non alphanumeric character ?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Kind regards,</div><div class=""><br class=""></div><div class="">Louis</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">Le 10 juil. 2016 à 11:49, Louis Abraham <<a href="mailto:louis.abraham@polytechnique.edu" class="">louis.abraham@polytechnique.edu</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi,<br class=""><br class="">I really love the simple yet effective autocompletion using [ESC].<br class="">However, I just began to dig into Scheme, and it seems the autocompletion doesn't work with functions whose name has dashes.<br class=""><br class="">For example, with the following code :<br class=""><br class=""> (define (a-b x) (* x x))<br class=""><br class=""> (define c-d 2)<br class=""><br class="">If I try and type a and press [ESC], nothing happens. However, when I try with c, then the completion works.<br class="">It might be a problem of the grammar.<br class=""><br class="">How can I fix it ? I don't know how the grammar influences the autocompletion.<br class=""><br class="">Best regards,<br class=""><br class="">Louis<br class=""><br class="">_______________________________________________<br class="">textmate mailing list<br class=""><a href="mailto:textmate@lists.macromates.com" class="">textmate@lists.macromates.com</a><br class="">http://lists.macromates.com/listinfo/textmate<br class=""></div></div></blockquote></div><br class=""></div></body></html>