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

Changing the settings for the lightbulb code action menu #199786

Merged
merged 21 commits into from
Dec 15, 2023

Conversation

aiday-mar
Copy link
Contributor

@aiday-mar aiday-mar commented Dec 1, 2023

In relation to slack conversation

fixes #200538

@aiday-mar aiday-mar self-assigned this Dec 1, 2023
aeschli
aeschli previously requested changes Dec 4, 2023
src/vs/editor/common/config/editorOptions.ts Outdated Show resolved Hide resolved
src/vs/editor/common/config/editorOptions.ts Outdated Show resolved Hide resolved
@aiday-mar aiday-mar requested a review from aeschli December 5, 2023 13:37
@aiday-mar
Copy link
Contributor Author

aiday-mar commented Dec 8, 2023

Following the review discussion, the code inside of codeActionModel.ts has been changed so that when the code actions are fetched through the lightbulb menu (trigger type auto), the following is verified:

- If the lightbulb setting is on, then return selection
- If the lightbulb setting is onCode, then do initial filtering that was done    
- If the lightbulb setting is off, then return undefined

Additionally the following listener is added in order to trigger an update of the UI when the configuration changes for the lightbulb setting

this._register(this._editor.onDidChangeConfiguration((e) => {
	if (e.hasChanged(EditorOption.lightbulb)) {
		this._update();
	}
}));

@aeschli aeschli requested a review from justschen December 11, 2023 11:03
@aeschli
Copy link
Contributor

aeschli commented Dec 11, 2023

ll looks good to me. We can merge the PR if @alexdima and @justschen like the direction

@alexdima alexdima requested a review from hediet December 12, 2023 14:10
Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, two small comments.

@aiday-mar
Copy link
Contributor Author

Added the review changes

src/vs/editor/browser/config/migrateOptions.ts Outdated Show resolved Hide resolved
src/vs/editor/common/config/editorOptions.ts Outdated Show resolved Hide resolved
Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @justschen Please also take a look. The thinking behind these changes is captured at #200538

Copy link
Contributor

@justschen justschen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! the migration and everything looks good :D

@aiday-mar aiday-mar merged commit 6ef3ba2 into main Dec 15, 2023
5 checks passed
@aiday-mar aiday-mar deleted the aiday/changingTheSettingsForTheLightbulb branch December 15, 2023 08:37
yiliang114 pushed a commit to yiliang114/vscode that referenced this pull request Jan 3, 2024
…ettingsForTheLightbulb

Changing the settings for the lightbulb code action menu
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Finalise the lightbulb/sparkle story
4 participants