Sublime Forum

Find a way to toggle between native autocompletion and lsp

#1

Hello everyone,

I usually use sublime text 4’s native autocomplete as it looks great to me and its trailing symbols feature is fantastic. Still, I always install the LSP for the language I’m using to take advantage of its formatting and code inspection benefits. I usually disable LSP autocomplete like this:
{
“disabled_capabilities”: {
“completionProvider”: true
}
}
However, there are times when native autocompletion is not referenced enough in my previous code, or I need to use some LSP feature like autoimports. Can you think of a way to toggle between the LSP and sublime’s native autocomplete? Perhaps some command to toggle the disabled capabilities option between True and False?

Thank you very much and sorry for my clumsiness. I am almost new to sublime and English is not my native language.

0 Likes

#2

Hey, did you try to set
“inhibit_word_completions”: true
option in LSP settings?

It should give you regular Sublime completions along the LSP ones.

1 Like

#3

Thanks for your answer!

In the end I have opted for the following: create a keybinding with the command to enable or disable the LSP. It’s very easy to turn it on when I need it for autocompletion or to suggest a method I haven’t previously used in my code, and then turn it off so that Sublime’s more intuitive and less aggressive native autocompletion helps me write code.

Anyway thank you very much!

0 Likes