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

[ST4] "auto_complete": false and others being ignored #4240

Open
davi5e opened this issue May 26, 2021 · 11 comments
Open

[ST4] "auto_complete": false and others being ignored #4240

davi5e opened this issue May 26, 2021 · 11 comments

Comments

@davi5e
Copy link

davi5e commented May 26, 2021

Description

"auto_complete": false in ~/.config/sublime-text/Packages/User/Preferences.sublime-settings is being completely ignored in my machine.

Not only that, hoping to stop the completion in other ways, both options below are also not doing a thing...

  • "auto_complete_size_limit": 0
  • "auto_complete_delay": 5000

Then I tried to check if the Console message reloading settings Packages/User/Preferences.sublime-settings was working and changed "auto_complete_cycle": true and this time the option was picked up (so some options work...). Stranger still, once I changed "tab_completion": true I noticed both ENTER and TAB are able to complete words...

So I gave up and came here to report the all around strange behavior. As far as my configuration is concerned, the completion is the only thing that the user file can't override...

Steps to reproduce

  1. Start Sublime Text
  2. Disable auto_complete
  3. The pop up still shows

Expected behavior

No pop up unless I type CTRL+SPACE.

Actual behavior

So far there is no way to disable and/or change major autocomplete features in my environment.

Environment

  • Build: 410
  • Operating system and version: Ubuntu 20.04
  • [Linux] Desktop Environment and/or Window Manager: KDE 5.18.5
  • Sublime installed via apt-get
@deathaxe
Copy link
Collaborator

deathaxe commented May 26, 2021

Stranger still, once I changed "tab_completion": true I noticed both ENTER and TAB are able to complete words...

Just tried ST3 with same results.

"auto_complete": false in ~/.config/sublime-text/Packages/User/Preferences.sublime-settings is being completely ignored in my machine.

Trying ST4 in SAFE MODE with following settings disables auto-completions from being displayed while typing. The only maybe unexpected behavior is tab_completion to need to be set false, too. I'd expect auto_complete: false to be enough.

// Settings in here override those in "Default/Preferences.sublime-settings",
// and are overridden in turn by syntax-specific settings.
{
	"auto_complete": false,
	"tab_completion": false,
}

Do you probably have some syntax specific settings set up? Those would overwrite Preferences.sublime-settings. It is also possible plugins set view specific settings, which would also override syntax specific ones.

The value for an active view can be queried with view.settings().get("auto_complete") via console. Doesn't display the source unfortunately though.

EDIT: I am on Windows 10 (in case it may make a difference).

@davi5e
Copy link
Author

davi5e commented May 26, 2021

So I did that and nothing changed... If the console is picking up the caret position there should be no pop up being displayed.

You also said plug-ins, I'll try disabling one by one. Anyhow, is there a "global" override? I was under the impression User/Preferences.sublime-settings would have the final word on settings...

image

@deathaxe
Copy link
Collaborator

The load order is described here https://www.sublimetext.com/docs/settings.html#settings_files

Before trying to disable plugins one by one you could try to start in SAFE MODE with all plugins disabled. If the issue persists it is a core bug for sure.

@hartsublime hartsublime self-assigned this May 26, 2021
@jeremytm
Copy link

I'm seeing the same thing (also in ST4 since I was tricked into upgrading).

Personally I'm trying to disable tab_completion however this setting is ignored and tab still applies the currently selected completion.

I have confirmed tab_completion is false using view.settings().get('tab_completion') in the console. I have also confirmed this is happening in safe mode.

image

@hartsublime
Copy link

@jeremytm thanks for the further investigation and report.

On the topic of ST4 upgrade I refer you to https://forum.sublimetext.com/t/sublime-text-4-update-faq/58001

@WareditorGit
Copy link

Having the same issue. In ST3 with "auto_complete": false you wouldn't see the popup window and tab would instantly auto complete to the first suggestion and following tab presses would cycle through the auto completion suggestions.

@davi5e
Copy link
Author

davi5e commented May 27, 2021

"auto_complete": false in safe mode do disable the popup...

"tab_completion": false in safe mode is being ignored as others have pointed out.

Probably it's some plugin in my case.

@deathaxe shouldn't there be a "master override" file? Overriding stuff that pops up in the UI for example could be simpler than poking around the list of which files override my custom settings...

@davi5e
Copy link
Author

davi5e commented May 27, 2021

By the way, how come view.settings().get("auto_complete") says it's disabled and I still get to see the dialog?

Even if there is a culprit outside the core ST4 code, it's still strange...

@deathaxe
Copy link
Collaborator

I am quite sure it's a core issue after all.

@br4nnigan
Copy link

I am quite sure it's a core issue after all.

it's a mess. I'm having the opposite issue.

But I'm also experiencing the "settings ignored" issue, expect in CodeIntel first. I got rid of it but then I was left with NO popups at all! (You could say that my setting of "want popups" is ignored?)

It's also no PHP issue.

I had the same behavior in my new ST4 Installation. With a Javascsript file. I uninstalled CodeIntel because I wouldn't get native popups again (with the Code Snippets) but I ended up with NO popups (no matter the settings). And same as in the above linked PHP issue I could open up a new tab and I would get popups. I go back to the "bad" tab, delete everything, and still no popups.

I know this is not strictly OPs issue. But I think it might actually all be related. Something is seriously afoul regarding settings and auto complete. And it's a big issue as this is a core feature.

@rchl
Copy link

rchl commented Jun 29, 2022

Judging from the sublimelsp/LSP-json#118, a plugin that defines on_query_completions listener but resolves with an empty list makes the completion popup trigger (with native, maybe buffer, items) even when auto_complete is disabled. I haven't tried with a minimal test case though.

I would probably expect the on_query_completions API to be disabled when auto_complete is disabled.

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

No branches or pull requests

7 participants