Open n-riesco opened 6 years ago
After more thought, I think this should be a separate setting in Hydrogen.
For some users having suggestions that don't match any characters is inconvenient, but for others is useful, because it allows exploring object properties (e.g. a user wants to explore what's exported under Math.
).
Another option (that goes against the policy of having language-specific code) would be to add another regexp here.
See https://github.com/n-riesco/ijavascript/issues/143
Currently, Hydrogen doesn't trigger a complete request unless the user has typed
autocomplete-plus.minimumWordLength
characters.I'm proposing that Hydrogen also filters out suggestions that don't match at least
minimumWordLength
characters. If I'm not mistaken, this can easlity be handled at parseCompletions, by filtering those suggestion where(cursor_end - cursor_start) < minimumWordLength
.