VS Code Extensions
VS Code extensions are add-ons that enhance the functionality of Visual Studio Code. Extensions can provide language support, linters, debuggers, themes, utilities, and much more. The VS Code Marketplace offers thousands of extensions for every workflow.
π Why Use Extensions?β
- Add support for new programming languages and frameworks.
- Improve code quality with linters and formatters.
- Integrate with version control systems like Git and GitHub.
- Customize the editorβs appearance and behavior.
- Boost productivity with utilities and shortcuts.
π οΈ How to Install Extensionsβ
- Open the Extensions panel:
Ctrl+Shift+X
(Windows/Linux)Cmd+Shift+X
(macOS)
- Search for the extension name.
- Click Install.
Or install from the command line:
code --install-extension <extension-identifier>
# Example:
code --install-extension ms-python.python
π¦ Recommended Extensionsβ
Utilityβ
- Vim β Vim emulation for modal editing.
- File Icons β File-specific icons for improved navigation.
- Prettier β Code formatter for JavaScript, TypeScript, CSS, and more.
- Code Runner β Run code snippets or files in multiple languages.
- Remote Development β Work with remote containers, SSH, or WSL.
- TODO Highlight β Highlight TODO, FIXME, and other annotations.
- TODO+ β Manage and track TODO lists in your code.
Pythonβ
- Python β Rich support for Python language, linting, debugging, and Jupyter notebooks.
Gitβ
- GitLens β Visualize code authorship and Git history.
- GitHub Pull Requests β Manage GitHub pull requests and issues.
HTMLβ
- Highlight Matching Tag β Highlights matching HTML tags.
TOMLβ
- Better TOML β TOML language support.
CSSβ
- Stylelint β Lint CSS/SCSS/Less with Stylelint.
Markdownβ
- Markdown Preview GitHub Styling β GitHub-style markdown preview.
- Markdown All in One β Shortcuts, TOC, auto preview, and more.
Rubyβ
- Ruby β Ruby language and debugging support.
Bashβ
- Bash IDE β Bash language server.
π§βπ» Example: Using Prettierβ
- Install the Prettier extension.
- Open a JavaScript, TypeScript, or CSS file.
- Format the file:
- Right-click and select Format Document
- Or use the shortcut:
Shift+Alt+F
π Useful Linksβ
π Notesβ
- Disable or uninstall unused extensions to keep VS Code fast.
- Many extensions have customizable settings in the Settings UI or
settings.json
. - Extensions can be updated automatically or manually from the Extensions panel.