-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Improve IntelliSense support when using VS Code #8043
Conversation
Improve IntelliSense support in Visual Studio Code by providing a jsconfig.json file that correctly maps @wordpress/ paths.
"coverage", | ||
"node_modules", | ||
"test/e2e/test-plugins", | ||
"vendor" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I borrowed these excludes from .eslintignore
—not sure how up to date they are. From what I understand reading the docs, VS Code just recommends that you exclude directories with lots of irrelevant source files e.g. build
and node_modules
.
Nice stuff. I'm wondering if it should be a local file which you add to the list of ignored files using your local bash configuration (unless it isn't specific only to VS Code). |
Agreed, it should be a local file added to your local Git Edit: To expand the reasons on why this shouldn't be in the repo, a similar request was made for core to add PHPStorm's I've considered in the past having a section in the core handbook that would highlight these types of enhancements for Editor/IDEs, the |
For what it's worth, Calypso has a
I don't think adding
It's not specific to VS Code in that any tool is free to parse it 😉 For example, Sourcegraph uses |
Ask yourself: which option does more good for the world?
|
I'm in two minds about this. On the one hand, I'm not wild about us adding IDE-specific stuff to Core. It could pretty easily get out of hand, if everyone wants the config for their specific editor added. On the other hand, we have the It's unfortunately that a good, global editor config standard hasn't really emerged, that would make the decision a bunch easier. I'm inclined to put this in Gutenberg for now, and look at how we can practically allow IDE configs in Core. Perhaps base it on current popularity or something. |
I didn't expect Thanks @noisysocks, let's do it under the guise that |
Improves IntelliSense support in Visual Studio Code by providing a
jsconfig.json
file that correctly maps@wordpress/
paths to their source location.This lets developers cmd+click on symbols to navigate to where they're defined:
It also improves the hints shown when using symbols imported from
@wordpress/
paths: