Share the plug-in for locating node modules in vscode: vscode-goto-node-modules

青灯夜游
Release: 2021-02-22 17:55:07
forward
3338 people have browsed it

Share the plug-in for locating node modules in vscode: vscode-goto-node-modules

Related recommendations: "vscode tutorial", "nodejs tutorial"

Using VSCode to develop Node.js ( When developing (including node and front-end Vue/Angle/React), I often encounter a very painful thing:

When I depend on a module, I want to briefly browse the source code and API of this module.

But there are an astonishing number of modules in the node_modules directory, and various scroll bars are scrolling, which tests your eyesight.

So I found such a plug-in Search node_modules. Unfortunately, this plug-in can only be searched and positioned by entering the module name through the command.

But can you directly locate the function from the import statement of the code, similar to holding down ctrl and left-clicking the mouse to go to the definition? This is so convenient:

import xxx from 'xxx' var xxx = require('xxx') ...
Copy after login

So, I developed it myself A plug-in is installed to quickly locate node modules: Share the plug-in for locating node modules in vscode: vscode-goto-node-modules.

Let’s get a GIF to feel it:

Share the plug-in for locating node modules in vscode: vscode-goto-node-modules

Since TypeScript already has good jump support, the plug-in does not implement ts-related jumps.

Plug-ins are also just packages.json files.

Enterravenqin the VSCode plug-in search to quickly search for the plug-in:

Share the plug-in for locating node modules in vscode: vscode-goto-node-modules

  • Project address: https://github .com/ravenq/Share the plug-in for locating node modules in vscode: vscode-goto-node-modules
  • Plugin Market: https://marketplace.visualstudio.com/items?itemName=ravenq.Share the plug-in for locating node modules in vscode: vscode-goto-node-modules

For more programming-related knowledge, please visit:Programming Teaching! !

The above is the detailed content of Share the plug-in for locating node modules in vscode: vscode-goto-node-modules. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!