android-dev-ext
android-dev-ext copied to clipboard
Intellisense doesn't work while can debug
ext version: v1.3.2
enabled exts:
- java extension package
- gradle tasks
- 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.
Same problem
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>
}
}
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
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.