Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent completed parentheses depending on auto_match_enabled #328

Open
danilobellini opened this issue Sep 5, 2021 · 0 comments
Open

Comments

@danilobellini
Copy link

(1) Usually the completion fills just the object name, but for functions the behavior is somewhat "stochastic": sometimes the completion include the ( and the positional parameter names, but not the ); sometimes the completion is just of the function name. That can be slightly addressed with a new configuration (besides auto_complete_function_params) to choose whether to add parameters+parentheses when the function name gets completed or to just complete the name (hence to add the parameters+parentheses a new completion would need to be "requested" after the name completion).

(2) The inconsistency is that the missing ) appears when auto_match_enabled is set as true, but not when set as false (here it's false, and that's how it should be kept, because it applies to several scenarios, not just the Jedi completion). That's a dependency on an external configuration. If the completion opened the parentheses, it should close it as well, no matter the auto_match_enabled value (like in emmet). The goal of setting auto_match_enabled as false is to require all typed parentheses to be manually paired, so that for every ( typed, a ) should be typed as well. Partial completion frustrate this "mental stack" of parentheses on typing, so I would presume that probably no one with auto_match_enabled set as false desires partial completion of not-typed parentheses (unmatched parenthesis completion).

I see no use in unmatched parenthesis completion (the default when auto_match_enabled is false) since it's simply annoying (the completion is either incomplete or [partially] undesired, the user will obviously need to type or erase something, that's like a snippet that generates invalid code due to the lack of the ending symbol), but that could be another configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant