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

Format selection #16823

Closed
wants to merge 9 commits into from
Closed

Conversation

terziele
Copy link
Contributor

Adding a new Format Selection action to a mouse context menu. As discussed here #16080

Release Notes:

  • Adding a Format Selection action to a mouse context menu.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Aug 25, 2024
# Conflicts:
#	crates/project/src/project.rs
None => return None,
};

let selections = self
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there an ideomatic way to get a multiselection without a cursor with a single char?

@@ -169,6 +177,9 @@ pub fn deploy_context_menu(
.separator()
.action("Rename Symbol", Box::new(Rename))
.action("Format Buffer", Box::new(Format))
.when(!selections, |builder| {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should the button be shown only when a LSP supports range formatting or something? Maybe something like a flag in settings a-la formatSelectionEnabled: true?

@terziele terziele marked this pull request as ready for review September 1, 2024 16:09
@ConradIrwin
Copy link
Member

@terziele Sorry for the slow reply here! This is something that we want, but the code around language servers is very in flux as we rebuild remoting for SSH.

I am going to close this, but if you want to rebase onto latest main in a few days, that would be fantastic. @mikayla-maki and I are about to shred the formatting code again, so wait until that lands :D

Otherwise if you'd like to pair on it: https://calendly.com/conradirwin/pairing

@terziele
Copy link
Contributor Author

@ConradIrwin Hey, thanks for reply!
I've rebased my branch onto latest main. Should I open a new PR/reopen this? Or wait until the code is shredded? :)

@ConradIrwin
Copy link
Member

@terziele we should be good to go now #18242 has landed, thanks for your patience!

@terziele
Copy link
Contributor Author

terziele commented Oct 4, 2024

@ConradIrwin Hey, just made a PR for formatting #18752

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants