Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Enabling this plugin causes autocompletion after semicolon #17

Open
rubenwardy opened this issue Nov 19, 2018 · 2 comments
Open

Enabling this plugin causes autocompletion after semicolon #17

rubenwardy opened this issue Nov 19, 2018 · 2 comments

Comments

@rubenwardy
Copy link

rubenwardy commented Nov 19, 2018

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

@laverdet
Copy link

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.

@TiriaAndersen
Copy link

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

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

No branches or pull requests

3 participants