atom-ide-cpp icon indicating copy to clipboard operation
atom-ide-cpp copied to clipboard

Enabling this plugin causes autocompletion after semicolon

Open rubenwardy opened this issue 7 years ago • 2 comments

This is annoying, as I want to press ; then enter to start a new line, but it instead autocompletes

screenshot_2018-11-19_16-15-42

rubenwardy avatar Nov 19 '18 16:11 rubenwardy

I found the following workaround to this:

Install from source:

git clone https://github.com/thomasjo/atom-ide-cpp.git
cd atom-ide-cpp
apm link .
apm install

Open node_modules/atom-languageclient/build/lib/auto-languageclient.js. Add this hack to getSuggestions:

  async getSuggestions(request) {
    if (request.prefix === ';') {
      return;
    }
    // rest of function here

It seems like this is an issue in clangd considering the very lightweight nature of this package. I built clangd from source using current svn trunk and still had this issue.

laverdet avatar Dec 19 '18 00:12 laverdet

Workaround for semicolon works great!

Still have the same problem for when expanding curly brackets though (e.g. for a function def). Instead of making a new line, it autocompletes into the curly bracket. Adapting the workaround to check for '{' prefix doesn't work either, because Atom generates both {} at the same time.

image

TiriaAndersen avatar Dec 10 '19 03:12 TiriaAndersen