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

[BUG] Too much auto-complete #369

Closed
JeffBezanson opened this issue Sep 19, 2019 · 14 comments
Closed

[BUG] Too much auto-complete #369

JeffBezanson opened this issue Sep 19, 2019 · 14 comments
Labels

Comments

@JeffBezanson
Copy link

Details

  • Atom version: 1.39.1
  • Julia version: 1.2.0
  • OS: linux
  • Package versions:
    • Atom.jl: 0.9.1
    • julia-client:
    • ink:

Steps to reproduce

I create a new file and type # Types. It suggests changing to types (so of course hitting enter accepts that instead of inserting a newline). (1) this is inside a comment, (2) the file is called untitled with no extension so I'm not sure what the completions are supposed to be for, (3) I'm not aware of a julia function or keyword types that this is trying to complete to. Does it just not like initial capitals? Why is writing Types so obviously wrong that the default is to switch it to types?

@JeffBezanson
Copy link
Author

Here's another one. I just naively typed Julia<enter> and it became JuliaAcademyData. Looking around, indeed such an identifier occurs in a file nearby where I am. Having that available via tab-completion would be reasonable I guess, but not being able to type the word Julia at the end of a line (without hitting esc or other tricks) by default seems like a bit much.

Digging through the settings I was lucky to find that this is caused by "autocomplete-plus", which can be disabled. But I humbly submit that this feature is absurd.

@aviatesk
Copy link
Member

aviatesk commented Sep 19, 2019

Those completions are actually not provided by Juno, but by autocomplete-plus, which is bundled with Atom itself by default:
You can tweak settings of the package via Settings -> Packages -> Autocomplete Plus.

Having that available via tab-completion would be reasonable I guess, but not being able to type the word Julia at the end of a line (without hitting esc or other tricks) by default seems like a bit much.

I think changing Keymap For Confirming A Suggestion setting to something like Tab will solve this.

Does it just not like initial capitals? Why is writing Types so obviously wrong that the default is to switch it to types?

Enabling Use Strict Matching For Built-In Provider or disabling Enable Built-In Provider will solve this.

@aviatesk
Copy link
Member

Juno's completions would only provided when Julia is running, on top of those default completions ;)

@JeffBezanson
Copy link
Author

Thanks for responding. Changing the settings does fix it, but I really think the default settings are terrible. I guess it's a bug in Atom then. I mean, is their intent really to by default change the last word of every line you type? I simply can't comprehend why that would be a good idea.

@pfitzseb
Copy link
Member

Juno's completions would only provided when Julia is running, on top of those default completions ;)

It might make sense to disable the default provider since we now have working local completions. I'll play around with that a bit and see how it feels.

I mean, is their intent really to by default change the last word of every line you type? I simply can't comprehend why that would be a good idea.

Yeah... Our installer package uber-juno will automatically "fix" that setting, but I've also submitted a PR to change the default.

@aviatesk
Copy link
Member

I mean, is their intent really to by default change the last word of every line you type? I simply can't comprehend why that would be a good idea.

Yeah... Our installer package uber-juno will automatically "fix" that setting, but I've also submitted a PR to change the default.

I agree with the idea of disabling the default provider on uber-juno installation (I don't like the default behaviour too).
One thing we have to consider is that it would disable the provider for all grammar scopes including markdown and such, where some people want to have the default provider for easy typing, but I'm not too sure how often people use the provider.

@aviatesk
Copy link
Member

I assign ctrl-l to autocomplete-plus: cancel for 'atom-text-editor:not(mini).autocomplete-active': selector, and it enables me to easily cancel the completion with minimal keystroke, I've been satisfied with that so far.

@pfitzseb
Copy link
Member

I agree with the idea of disabling the default provider on uber-juno installation (I don't like the default behaviour too).

No, we don't need to do anything that drastic -- it should be enough to set excludeLowerPriority: true in our provider. That'll turn off the default completions only in "our" scopes.

@aviatesk
Copy link
Member

No, we don't need to do anything that drastic -- it should be enough to set excludeLowerPriority: true in our provider. That'll turn off the default completions only in "our" scopes.

Ah I see, sounds cool. And we now have the config to set the priority of our provider and it may allow us "make our provider humble" (i.e. still keeps snippets alive if we set the config to an lower value) ;)

@pfitzseb
Copy link
Member

Yup. Should make sure that we play nice with snippets and latex-completions. I'll open a PR sometime today, I hope.

@aviatesk
Copy link
Member

cool, I'll give a review on it.

@pfitzseb
Copy link
Member

JunoLab/atom-julia-client#620

@JeffBezanson
Copy link
Author

Thanks for making those PRs! Glad I'm not the only one who sees it this way :)

@timholy
Copy link
Contributor

timholy commented Sep 19, 2019

My escape key was wearing out. Thanks for reporting and fixing!

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

No branches or pull requests

4 participants