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

Inline completion not working #994

Open
Pranith12250 opened this issue Mar 25, 2024 · 4 comments
Open

Inline completion not working #994

Pranith12250 opened this issue Mar 25, 2024 · 4 comments
Assignees

Comments

@Pranith12250
Copy link

Extension sample

inline-completions

VS Code version

1.87.2

What went wrong?

I am trying to understand how the inline code completion feature of vs code works and how I can use it in an extension. So, to understand its working, I went and looked at its code sample here.
However, as soon as I open and run the code without making any changes at all, I see the following errors:

Activating extension 'vscode-samples.inline-completion-sample' failed: Extension 'vscode-samples.inline-completion-sample' CANNOT use API proposal: inlineCompletionsAdditions. Its package.json#enabledApiProposals-property declares: but NOT inlineCompletionsAdditions. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api vscode-samples.inline-completion-sample.

Screenshot 2024-03-23 at 2 37 41 AM

[vscode-samples.inline-completion-sample]: editor/inlineCompletions/actions is a proposed menu identifier. It requires 'package.json#enabledApiProposals: ["inlineCompletionsAdditions"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api vscode-samples.inline-completion-sample

Screenshot 2024-03-23 at 2 38 12 AM

I try running it regardless to see if it still works and it opens a new window as a playground with the below code:

// Trigger inline completions after each line

// [0,*):// Trigger inline completions in this line, they work!
// Trigger inline completions in this line

// [0,*):console.log(


// [0,*):console.log("foo"
// [0,*):console.log({ label: "("


// [0,*):console.log(`${(1+2}`)

// [0,*):({\n){

// [33,33):lambda x: x.notnull()
notNull = languages.apply();

I try typing in "console" just as they did in the demo gif in the sample code page I linked earlier but I am not getting the inline completion. I am just getting normal completion:

Screenshot 2024-03-23 at 2 24 20 AM

Also, I noticed that gif in the sample code is slightly cropped so I am not fully sure how they activated the inline completion as well. I see this issue having been raised multiple times in the past but I do not see any good solutions to it yet other than using VS Code insiders as pointed out by tamuratak in the discussion repo here.
So, it would be nice if this worked in normal VS Code as well so that I can understand its working better.

@shaunhurryup
Copy link

Same error and not work +1 :(

@csh0101
Copy link

csh0101 commented Jul 27, 2024

the same error :(

@chinmay1819
Copy link

chinmay1819 commented Aug 12, 2024

please read error log carefully :)

code --enable-proposed-api vscode-samples.inline-completion-sample
then ,
https://stackoverflow.com/questions/68263285/how-to-trigger-inline-suggestion-in-vscode refer to changing settings ...

@rcjsuen
Copy link

rcjsuen commented Sep 4, 2024

The sample worked for me after applying the changes suggested in #879.

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

6 participants