Quantcast
Channel: Active questions tagged code-completion - Stack Overflow
Viewing all articles
Browse latest Browse all 96

Not able to select Android Studio Inline Code Suggestion

$
0
0

Hi I have the following set up Android Studio Meerkat | 2024.3.1 Patch 2.

I am having trouble selecting Inline Code suggestion. I am using Kotlin.

For example when i type Spacer( , it gives me a bunch of code suggestions and one of them i want to select is Spacer(modifier:Modifer). But when i select that option and hit TAB or ENTER , the code completes like this "Spacer()". It doesn't give me the full "Spacer(modifier:Modifer)".

But when i type Spacer() and put the cursor in the middle of the brackets and hit Enter it auto populates a bunch of code which i am able to select like

 Spacer(            modifier = Modifier                .width(300.dp)                .height(2.dp)                .background(Color.Black)        )

Any suggestions will definitely help.

What all i have tried.

  • Rebuild Project

  • Cleared Cache

  • Power Save Mode unchecked

  • Uninstalled and Installed Andriod Studio Again

  • Added the following code to "Editor.xml", since Inline Completions settings page was blank under Settings.

    <component name="EditorSettings"><option name="INLINE_COMPLETION_ENABLED" value="true" /></component></application>
  • Under Settings

  1. Selected "Insert Selected suggestion by pressing space, dot, or other context-dependent keys"

  2. Keymap settings

    1. Chose Lookup Item = Enter

    2. Chose Lookup Item and Invoke Complete Statement = Shift + Command + Enter

    3. Chose Lookup Item and Insert Dot = ^.

    4. Complete Current Statement = Shift + Command + Enter, Enter , Tab


Viewing all articles
Browse latest Browse all 96

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>