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

Add Drupal-related VSCode extensions and settings. #30

Merged
merged 10 commits into from
Aug 27, 2021

Conversation

paul121
Copy link
Contributor

@paul121 paul121 commented Aug 15, 2021

The Problem/Issue/Bug

Addresses #6.

How this PR Solves The Problem

Adds 3 of the extensions and default settings listed at https://www.drupal.org/docs/develop/development-tools/configuring-visual-studio-code

These docs recommend other extensions but it seems that these are not available on the Open VSX registry: https://open-vsx.org/

Notable extensions that are missing are:

  • phpcs
  • phpcbf
  • composer

We might need to request the extension authors that these get added, or it looks like there may be a method of adding these to the registry too. More info here:https://www.gitpod.io/docs/vscode-extensions#where-do-i-find-extensions

Manual Testing Instructions

Related Issue Link(s)

See #6

Release/Deployment notes

@paul121
Copy link
Contributor Author

paul121 commented Aug 15, 2021

Oops, it looks like the first commit had some other unintentional changes. Must admit I am pretty new to using the VSCode Git UI, so I think that just slipped in without me noticing! Will try and clean that up later.

On the bright side, I made this PR entirely from a GitPod 🥳

@paul121
Copy link
Contributor Author

paul121 commented Aug 20, 2021

Oops, it looks like the first commit had some other unintentional changes.

I force pushed to clean up those changes so I think this is ready for review. This could probably be expanded on further but I think this is a good start!

@shaal
Copy link
Owner

shaal commented Aug 20, 2021

@paul121 Thank you so much!

It seems that there are a lot of recommended vscode extensions that are still missing.

@paul121 What do you think about following the instructions here -
https://github.com/open-vsx/publish-extensions
To publish the missing vscode extension in Open VSX, and then they should be available there.

@paul121
Copy link
Contributor Author

paul121 commented Aug 20, 2021

Cool, I was wondering about that. I'll try and start that soon

@shaal
Copy link
Owner

shaal commented Aug 20, 2021 via email

@paul121
Copy link
Contributor Author

paul121 commented Aug 21, 2021

Just some notes on status of these extensions...

TLDR; I'm just going to focus on phpcs, phpcbf and composer like I mentioned in my first comment. Everything else seems to be outdated at this point.

General

Drupal 8

Drupal 7

  • Lets not go there

@paul121
Copy link
Contributor Author

paul121 commented Aug 22, 2021

I think the php-sniffer extension will work great for both phpcs and phpcbf integration in vscode!: https://open-vsx.org/extension/wongjn/php-sniffer.

I installed and configured drupal/coder according to these docs: https://www.drupal.org/docs/contributed-modules/code-review-module/installing-coder-sniffer

Now I'm curious if we she could configure an alias for running phpcs as recommended here: https://www.drupal.org/docs/contributed-modules/code-review-module/php-codesniffer-command-line-usage#alias

@paul121
Copy link
Contributor Author

paul121 commented Aug 22, 2021

I opened a PR to add the vscode-composer extension to open-vsx: open-vsx/publish-extensions#410

The latest release was in 2017.

It seems like this may be another alternative (not on open-vsx) but I have not tested: https://github.com/faelv/composer-companion

@shaal
Copy link
Owner

shaal commented Aug 27, 2021

@paul121 Look great to me, thank you so much.
I added the setting that will allow quick-search (Cmd+P) for all files that are in .gitignore (very useful in Drupal development, because core and contrib projects are all in .gitignore), while still excluding vendor/ directory.

I think we should open follow-up issues for any additional vscode extensions that were not ready yet.

Copy link
Owner

@shaal shaal left a comment

Choose a reason for hiding this comment

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

👍

@paul121
Copy link
Contributor Author

paul121 commented Aug 27, 2021

Nice addition!

@paul121
Copy link
Contributor Author

paul121 commented Aug 27, 2021

Opened a new issue for adding a composer extension: #33

@shaal shaal merged commit 56e3e1f into shaal:main Aug 27, 2021
@paul121 paul121 deleted the drupal-related-extensions branch August 27, 2021 17:06
@shaal shaal mentioned this pull request Oct 1, 2021
2 tasks
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

Successfully merging this pull request may close these issues.

None yet

2 participants