多个配置配置文件。
假设我使用了两种或两种以上的技术。例如PHP和JS (nodejs)。
有可能有一个PHP概要文件,其中vscode将全部设置为php,而另一个配置文件的vscode全部设置为nodejs。
我提出这个问题,这样我就不必在vscode中填充那些在那时我不会使用的扩展。只使用与当时使用的技术相关的内容。
有可能这样做吗?
发布于 2022-10-19 01:30:48
您可以在专用文件夹中安装一组特定于技术的扩展,并启动配置为使用该文件夹的vscode实例。
例如(对于Mac,我可以想象Windows上的过程是类似的):
我从一个包含node
和php
项目的文件夹以及一个将安装扩展的空vscode-ext
开始:
❯ # ~/src/local/vscode-multi-project
❯ tree
.
├── node
│ └── index.js
├── php
│ └── index.php
└── vscode-ext
3 directories, 2 files
将特定于项目的扩展安装到各自的文件夹中(也可以使用UI )。
❯ code --extensions-dir vscode-ext/node --install-extension chris-noring.node-snippets
Installing extensions...
Installing extension 'chris-noring.node-snippets'...
(node:54394) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Electron --trace-deprecation ...` to show where the warning was created)
Extension 'chris-noring.node-snippets' v1.3.3 was successfully installed.
❯ code --extensions-dir vscode-ext/php --install-extension xdebug.php-debug
Installing extensions...
Installing extension 'xdebug.php-debug'...
(node:54476) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Electron --trace-deprecation ...` to show where the warning was created)
❯ tree -L 3
.
├── node
│ └── index.js
├── php
│ └── index.php
└── vscode-ext
├── node
│ └── chris-noring.node-snippets-1.3.3
└── php
└── xdebug.php-debug-1.29.0
7 directories, 2 files
确保安装了扩展
❯ code --extensions-dir vscode-ext/node node
❯ code --extensions-dir vscode-ext/php php
https://stackoverflow.com/questions/74118617
复制相似问题