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

Third party command not being invoked on Ctr-M-Space shortcut #931

Open
patso23 opened this issue Jul 27, 2022 · 2 comments
Open

Third party command not being invoked on Ctr-M-Space shortcut #931

patso23 opened this issue Jul 27, 2022 · 2 comments

Comments

@patso23
Copy link

patso23 commented Jul 27, 2022

Environment

  • Visual Studio version: VS 2022 Enterprise 64-bit
  • CodeMaid version: 12.0
  • Code language: C#

Description

Third party command not being invoked on Ctr-M-Space shortcut, but is being invoked when right clicking project and selecting Cleanup Selected Code. (Specifically CM+ in this instance)

Steps to recreate

  1. Install CodeMaid 12.0
  2. Install CM+ extension v1.1.5
  3. In Extensions -> CodeMaid -> Options -> Third Party, add "Tools.CM+Format" to other cleaning command textbox
  4. Open c# file with using statements and clean using Ctr-M-Space. System using statements are moved down alphabetically instead of to the top, as expected with CM+

Current behavior

CM+ third party command is not invoked, System using statements are moved down in the list alphabetically

Expected behavior

CM+ third party command would be invoked, moving System using statements to the top. (This expected behavior is observed when right clicking on a project and selecting Cleanup Selected Code, just not with Ctr-M-Space)

@codecadwallader
Copy link
Owner

Thanks for reporting the issue. Can you confirm if you have changed the Visual Studio settings to place system directives first? This is off by default, but can be enabled at Tools->Options->Text Editor->C#->Advanced->Using Directives->Place 'System' directives first when sorting usings

With that setting enabled you should find that directly invoking Format Document or using CodeMaid (which invokes Format Document) both move System using statements to the top.

image

@patso23
Copy link
Author

patso23 commented Aug 19, 2022

Doh, yes you're correct. I didn't have this checked. Apologies, so many settings sometimes it's hard to figure where everything is.

Thank you for the response.

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

2 participants