sublimelsp / LSP-json

Schema validation/completions for your JSON and Sublime files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable auto complete

IkorJefocur opened this issue · comments

A little background: I'm a real, i mean, 100% hater of autocomplete and all that popups over my code and intercepts keyboard controls. So I decided to cut off this feature at the root a years ago by setting "auto_complete": false in general Sublime's settings.
But today I have installed LSP-json for fast linting, highlighting erorrs, hints, etc. in my JSON files. But not for autocomplete. I never asked for this.
The problem is, even with "auto_complete": false, when that plugin enabled, Sublime showing me autocomplete popup at least when I starting to write property name.
And i don't know how to disable this behavior. Maybe I missing some option in plugin's configuration, but I rather guess it's some kind of a bug. Because I have installed a lot of plugins in my developer's life, and no one of them ever showed me an autocomplete interface with aforementioned option disabled.
If it is, after all, somehow, not a bug but a feature, I have a question "why?" and asking for help to disable it.

You can do this in your LSP-json.sublime-settings.

{
    "disabled_capabilities": {
        "completionProvider": true,
    },
}

Oh, really... Thanks, that helped.
But, anyway, I still have a question "why?". Shouldn't plugin take into account auto_complete option from Sublime's preferences?

Either way makes sense to me. Maybe someone doesn't want ST's autocompletion (since it's provided by "guessing") but wants to keep LSP's.

Maybe it would be true if not the next problem i met. Plugin turns on default Sublime's autocomplete for JSON files! Autocomplete popup keep showing, but now it suggests me words that exists on other places inside opened file.

Not sure what you mean. "completionProvider": true, turns on ST's autocompletion?

No, autocompletion turns on no matter what value this option has, just if a plugin is installed and enabled. Setting completionProvider to true disables autocomplete suggestions from plugin, but not from Sublime.

No, autocompletion turns on no matter what value this option has, just if a plugin is installed and enabled. Setting completionProvider to true disables autocomplete suggestions from plugin, but not from Sublime.

Makes sense to me.

My first thought is that auto_complete: false should also disable the on_query_completions API. If that would be the case then the LSP completions would also not show up. So maybe this should be a core bug.

This looks like this core issue: sublimehq/sublime_text#4240

Nothing to track in this repo so closing.