Ace: Autocomplete matching problems

Created on 20 Jun 2016  路  9Comments  路  Source: ajaxorg/ace

Sorry if this has already been reported, but there are so many AC issues that it's hard to know if this is a duplicate.

This is using the PHP mode

This works

screen shot 2016-06-19 at 9 05 01 pm

This doesn't
It should be showing foreach and endforeach, but instead it's finding letters throughout the possible options.

screen shot 2016-06-19 at 9 05 17 pm

I am still finding my way around ACE so I haven't looked at the regex involved, but maybe someone else has an idea if this has already been discussed.

Thanks!

language_tools

All 9 comments

Looks like this is being worked on in this PR: https://github.com/ajaxorg/ace/pull/2996

This issue should be fixed by #3730.

@nightwing - just testing this now with v1.4.0 and unfortunately it doesn't seem any better with my OP example:

image

It's still not matching foreach correctly.

OT, but I also think it would be nice if the matching popup was wider so that you could read all of php function

Thanks again and please let me know if I can help test this further somehow.

@adrianbj do you disable the snippet completer?
looks like aside from the sorting issue, there is also an issue with foreach not being present in the list of functions.

I am setting:

enableBasicAutocompletion: true,
enableLiveAutocompletion: true,

but not specifically setting enableSnippets: true

I didn't think that setting was relevant in this case.

Maybe the only outstanding issue here is a missing foreach ?

Thanks for adding foreach, but it's still missing endforeach.

Actually I am just noticing that if, else, elseif, endif and I am sure many others are also missing. I am not sure what your end goal is in terms of supporting all functions and language constructs in all supported languages. Do you have certain people maintaining certain languages?

BTW - I am not too worried about this - just wanted to get your thoughts on the importance of completeness.

php completer was contributed by @adamjimenez, and i am not sure why are all the keywords missing, perhaps completer should use the list of keywords from the mode too.

I think with the next release we need to split completers and linters into separate packages to help community create better tooling for different languages, without having to go through one central place.

Just a quick note. There is a typo: arrsort instead of arsort. There are two things to notice in this screencast - one is the arrsort typo, but the other is that even though arrsort exists in the list, as you type more characters to get closer to arrsort, it actually removes the match leaving two results, neither of which are really that relevant at this point.

arrsort

fixed this in #3745

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ketysek picture ketysek  路  3Comments

mafar picture mafar  路  4Comments

gsf picture gsf  路  6Comments

aslushnikov picture aslushnikov  路  4Comments

STRd6 picture STRd6  路  4Comments