VS Code Extensions for Development (#2826)

# Description of Changes

# Introduce Recommended VS Code Extensions for Development

## Summary
This PR introduces a curated list of recommended Visual Studio Code
extensions to enhance the development workflow for Python, Java, and
Spring Boot projects. These extensions provide essential features such
as code formatting, linting, debugging, dependency management, and
remote development support.

## Motivation
Setting up a consistent development environment can be challenging,
especially when working in a team. By providing a predefined list of VS
Code extensions, we ensure that all developers have access to the
necessary tools for an efficient and streamlined workflow. This helps
maintain code quality, improves productivity, and reduces configuration
overhead.

## Benefits
- **Improved Code Quality**: Extensions like `black-formatter`,
`flake8`, and `checkstyle` enforce best coding practices.
- **Enhanced Debugging and Development**: Java and Python-specific
extensions provide powerful debugging, IntelliSense, and dependency
management capabilities.
- **Spring Boot Support**: Tools like `vscode-spring-boot-dashboard` and
`vscode-spring-initializr` streamline Spring Boot application
development.
- **Remote Development Capabilities**: Extensions like
`remote-containers` and `remote-extensionpack` enable seamless
development in containerized and remote environments.
- **Consistency Across Team Members**: Ensures a unified development
experience across all contributors, reducing the time spent on setup and
troubleshooting.

## Changes Introduced
- Added a `.vscode/extensions.json` file containing a list of
recommended VS Code extensions.
- The list includes extensions for:
  - Python development (formatting, linting, debugging)
- Java development (code formatting, debugging, dependency management,
Gradle)
- Spring Boot development (Spring Boot dashboard, Spring Initializr,
etc.)
  - Remote development support (Containers, SSH, WSL)
  - Code spell checking and pre-commit hook management

## How to Use
1. Open VS Code.
2. When prompted, install the recommended extensions.
3. Alternatively, open the command palette (`Ctrl + Shift + P` or `Cmd +
Shift + P` on macOS) and run:

   ```sh
   Extensions: Show Recommended Extensions
   ```

4. Install the required extensions from the list.

## Next Steps
- Developers should install the recommended extensions to take full
advantage of the improvements.
- Optionally, update the list in `.vscode/extensions.json` if new
extensions are required in the future.

---

### References
- [VS Code Extension
Recommendations](https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions)
- [Prettier for Code Formatting](https://prettier.io/)
- [Flake8 Linter for Python](https://flake8.pycqa.org/en/latest/)

Let me know if you have any feedback or suggestions!


---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
This commit is contained in:
Ludy 2025-02-01 00:34:04 +01:00 committed by GitHub
parent d9eda14521
commit c5cffdcacb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 36 additions and 2 deletions

1
.gitignore vendored
View File

@ -140,6 +140,7 @@ venv.bak/
# VS Code
/.vscode/**/*
!/.vscode/settings.json
!/.vscode/extensions.json
# IntelliJ IDEA
.idea/

24
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,24 @@
{
"recommendations": [
"elagil.pre-commit-helper", // Support for pre-commit hooks to enforce code quality
"josevseb.google-java-format-for-vs-code", // Google Java code formatter to follow the Google Java Style Guide
"ms-python.black-formatter", // Python code formatter using Black
"ms-python.flake8", // Flake8 linter for Python to enforce code quality
"ms-python.python", // Official Microsoft Python extension with IntelliSense, debugging, and Jupyter support
// "ms-vscode-remote.remote-containers", // Support for remote development with containers (Docker, Dev Containers)
// "ms-vscode-remote.vscode-remote-extensionpack", // Remote Development Pack for SSH, WSL, and Containers
"Oracle.oracle-java", // Oracle Java extension with additional features for Java development
"redhat.java", // Java support by Red Hat with IntelliSense, debugging, and code navigation
"shengchen.vscode-checkstyle", // Checkstyle integration for Java code quality checks
"streetsidesoftware.code-spell-checker", // Spell checker for code to avoid typos
"vmware.vscode-boot-dev-pack", // Developer tools for Spring Boot by VMware
"vmware.vscode-spring-boot", // Spring Boot tools by VMware for enhanced Spring development
"vscjava.vscode-gradle", // Gradle extension for build and automation support
"vscjava.vscode-java-debug", // Debugging support for Java projects
"vscjava.vscode-java-dependency", // Java dependency management within VS Code
"vscjava.vscode-java-pack", // Java Extension Pack with essential Java tools for VS Code
"vscjava.vscode-java-test", // Java test framework for running and debugging tests in VS Code
"vscjava.vscode-spring-boot-dashboard", // Spring Boot dashboard for managing and visualizing Spring Boot applications
"vscjava.vscode-spring-initializr" // Support for Spring Initializr to create new Spring projects
]
}

View File

@ -39,6 +39,16 @@ Stirling-PDF is built using:
2. Install Docker and JDK17 if not already installed.
3. Install a recommended Java IDE such as Eclipse, IntelliJ, or VSCode
1. Only VSCode
1. Open VS Code.
2. When prompted, install the recommended extensions.
3. Alternatively, open the command palette (`Ctrl + Shift + P` or `Cmd + Shift + P` on macOS) and run:
```sh
Extensions: Show Recommended Extensions
```
4. Install the required extensions from the list.
4. Lombok Setup
Stirling-PDF uses Lombok to reduce boilerplate code. Some IDEs, like Eclipse, don't support Lombok out of the box. To set up Lombok in your development environment:
@ -613,4 +623,3 @@ dependencies {
- Review the changes in `verification-metadata.xml` to ensure they match your dependency updates
This ensures dependencies are properly verified and secure while maintaining transparency in the repository.