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

Display context menu "PHP Code Sniffer" only in PHP files #200

Open
pierresh opened this issue Apr 10, 2021 · 7 comments
Open

Display context menu "PHP Code Sniffer" only in PHP files #200

pierresh opened this issue Apr 10, 2021 · 7 comments
Labels

Comments

@pierresh
Copy link

Hello,

I think it would be better if the context menu "PHP Code Sniffer" is displayed only in PHP files. I am working on Typescript files and it still appears while this is not relevant in that case. Thanks!

WX20210410-101404@2x

@benmatselby
Copy link
Owner

Hey @pierresh

Is extensions_to_execute defined in your settings to PHP?

@pierresh
Copy link
Author

Thanks a lot for your prompt feedback. Yes extensions_to_execute is set to php

Also, I run Subline Text 3 version 3.2.2, build 3211

WX20210410-174627@2x

@benmatselby
Copy link
Owner

Ok. I have to be honest and say I've not used Sublime in about 3 years and I'm no longer using PHP. Therefore it's unlikely I'll be able to fix or implement this any time soon. I hope you understand.

@pierresh
Copy link
Author

alright, thanks for your feedback

@srichter
Copy link

Unfortunately this isn't possible yet, see sublimehq/sublime_text#1859 and sublimehq/sublime_text#1095

@pierresh
Copy link
Author

I think it is possible because that is already the case with JsPrettier. This appears in the sub-menu when files can be formatted with Prettier, but not in others.

Per example, you can see JsPrettier in my screenshots above with PHP and Typescript files. Then, if I open the configuration file of MySQL (which is not supported by Prettier), that JsPrettier is then no more available in the sub-menu.

WX20210421-234342@2x

@srichter
Copy link

It's possible with JsPrettier because it's only a single menu item, not an expandable menu item that contains multiple other items. That's what the linked issues are about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants