Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellisense doesn't work while can debug #103

Open
JoeyRxy opened this issue Oct 15, 2020 · 4 comments
Open

Intellisense doesn't work while can debug #103

JoeyRxy opened this issue Oct 15, 2020 · 4 comments

Comments

@JoeyRxy
Copy link

JoeyRxy commented Oct 15, 2020

ext version: v1.3.2

enabled exts:

  1. java extension package
  2. gradle tasks
  3. this ext

My project is created by Android Studio.


I have configured the launch.json and tasks.json (although I think these configs have nothing to do with Intellisense), and I can build and debug my project on my phone.

The androidx libs are included in settings.json as your wiki page suggested.

But, Intellisense doesn't work. eg: When I typing findView... in MainActivity, there's no popup.

@shahriar0247
Copy link

Same problem

@zzxoto
Copy link

zzxoto commented Apr 7, 2021

Try <ctrl+space> where you need completion e.g.

public class MainActivity extends AppCompatActivity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    this.<ctrl + space>
  }
}

@zzxoto
Copy link

zzxoto commented Apr 7, 2021

Infact getting back to the earlier comment, turns out only way to trigger autocomplete is <ctrl + space> which is pain especially for such a big api as android. Also, peek / goto definition doesn't work. I have attached my vscode intellisense configuration, which is pretty much the default except for couple of settings.

    //BEGIN: Intellesense
    // Controls if quick suggestions should show up while typing
    "editor.quickSuggestions": {
        "other": false,
        "comments": false,
        "strings": false
    },

      // Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.
    "editor.acceptSuggestionOnCommitCharacter": true,

    // Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions. The value 'smart' means only accept a suggestion with Enter when it makes a textual change
    "editor.acceptSuggestionOnEnter": "on",

    // Controls the delay in ms after which quick suggestions will show up.
    "editor.quickSuggestionsDelay": 10,

    // Controls if suggestions should automatically show up when typing trigger characters
    "editor.suggestOnTriggerCharacters": true,

    // Controls if pressing tab inserts the best suggestion and if tab cycles through other suggestions
    "editor.tabCompletion": "off",

    // Controls whether sorting favours words that appear close to the cursor
    "editor.suggest.localityBonus": true,

    // Controls how suggestions are pre-selected when showing the suggest list
    "editor.suggestSelection": "recentlyUsed",

    // Enable word based suggestions
    "editor.wordBasedSuggestions": true,

    // Enable parameter hints
    "editor.parameterHints.enabled": true,
    //END: Intellesense

@adelphes
Copy link
Owner

My understanding is that VSCode is responsible for triggering intellisense based on your settings (but I may be wrong). It's definitely the case that the extension does not look for Ctrl-space (or any other key combination) to show suggestions.

The Peek/Go to definition options are not currently implemented in the extension. Any PRs are always appreciated.

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

No branches or pull requests

4 participants