Lsp: How do I reopen the autocompletion list without typing any character?

Created on 29 Sep 2019  路  3Comments  路  Source: sublimelsp/LSP

First of all, sorry if this has been asked before. I searched through the issues but couldn't find anything similar to my question.
I've been struggling with this ever since I started using this package (which is very well done and it's made my dream of using Sublime as my C++ IDE finally come true, so thank you so much!).

Basically, (very) often times it happens that I'm writing a statement and I need to invoke some method on an object. The code would look like this:

my_object.my_meth|

with the caret being where the pipe symbol is. Then I realize that my_method isn't the method I want but it's some other method I don't exactly remember the name of. So I would hit Ctrl + Backspace to delete everything all the way back to the dot. Here comes the part where I struggle with.
What I would like to do now is simply reopen the list of available methods and being able to pick one, but apparently there's no way to do that! Normally, IDEs do this upon pressing Ctrl + Space but that doesn't seem to be the case for LSP.
As a workaround, I type a random character which will bring up all the methods containing the character I typed but that's sub-optimal as the method I'm looking for may not contain it. Because of this, I've tried to type the letter E as it's the most common letter in the English language, thus increasing the chances of getting my method in the resulting list; but again, not really an ideal solution. Is there a shortcut I haven't seen that does this or is this simply not implemented/implementable (because of how the Sublime framework works maybe) by LSP?
It's really the only thing I find frustrating about this package. As for the rest, I don't miss CLion and QtCreator at all!

I'm on Arch Linux and I installed LSP through Package Control. I think the reproduction steps are well explained above :)

questioheldebug

All 3 comments

The default keybinding for manually running auto-complete is alt+/. You can see all the keybindings by running prefs:key from the command palette. You could remap it to ctrl+space if you want:

    { "keys": ["ctrl+space"], "command": "auto_complete" },

Thank you! I tried and it works as expect. It's...an interesting choice as a key mapping since CTRL+SPACE seems to be pretty much the standard.
I'll try this combination and see how comfortable I feel with it. Thank you again for your help! :)

Funny, it's only the Linux bindings that have alt+/ binding, windows and OS-X both use ctrl+space

Was this page helpful?
0 / 5 - 0 ratings