atom-elmjutsu icon indicating copy to clipboard operation
atom-elmjutsu copied to clipboard

Insert case/of completion not working

Open sentience opened this issue 7 years ago • 11 comments

The ‘Insert case/of’ special completion is not being offered to me, even though it is enabled in my preferences. Other special completions are working fine.

Atom 1.15.0 stable

sentience avatar Mar 30 '17 12:03 sentience

Hi! Do you have a sample scenario where it's not working? Note that there should be a space at the end of the line for it to offer case/of completion :-) You can try this example (type space after "case bool"):

module Main exposing (..)

foo : Bool -> Int
foo bool =
    case bool

case-of-example

Oh, and it only works if there are type signatures (for now) :-)

halohalospecial avatar Mar 30 '17 23:03 halohalospecial

Tried it with the exact code above, and the completion is not offered. I made sure to type the space after bool.

Not sure what you mean by “only works if there are type signatures”. There is a type signature for the foo function in the example above; is that all you mean? Or is this some other feature of Elmjutsu that must be enabled (such as the type tooltips)?

sentience avatar Mar 30 '17 23:03 sentience

Yep. Your case sure is weird hmm. That should work if the other special completions are working fine. Can you check if there are errors in the Atom console?

halohalospecial avatar Mar 31 '17 00:03 halohalospecial

Nothing in the console, I’m afraid.

Aha! I disabled the case/of special completion option, closed Preferences, reopened preferences, enabled the case/of special completion option, and it’s working now! ¯\_(ツ)_/¯

sentience avatar Mar 31 '17 00:03 sentience

Haha! Software :grinning: Glad you got it working!

halohalospecial avatar Mar 31 '17 00:03 halohalospecial

Hello, I'm experiencing the same issue and I'm not able to fix it 🙁. No errors in console, nothing. I'm on MacBook Pro, late 2015, macOS Sierra 10.12.6, Atom 1.19.5.

jacoporicare avatar Sep 02 '17 15:09 jacoporicare

Hi @jacoporicare, can you provide a screenshot? Thanks!

halohalospecial avatar Sep 03 '17 01:09 halohalospecial

case-of

jacoporicare avatar Sep 03 '17 10:09 jacoporicare

BTW I know it's a different topic but I have to press Enter twice when I type = because I have to "confirm" the autocomplete. Is there a way to not pre-select the first item or even better not to offer an item which is exactly the same like I typed? E.g. if I type = then it's not necessary to offer =.

jacoporicare avatar Sep 03 '17 10:09 jacoporicare

@jacoporicare, I tried your example and it's working. Settings view also looks fine. Maybe another Atom package has a bad interaction with that feature?

Regarding the issue with =, the hack discussed here doesn't work anymore with the recent version of autocomplete-plus. :cry: As a workaround, you can set Autocomplete Min Chars to 2 or higher if you don't want to autocomplete 1-character symbols.

halohalospecial avatar Sep 05 '17 11:09 halohalospecial

Thank you, I'll investigate it further. Thanks for the tip with Min Chars settings, that should help.

jacoporicare avatar Sep 06 '17 08:09 jacoporicare