Skip to content

Commit

Permalink
Merge pull request joomla#209 from Elfangor93/patch-1
Browse files Browse the repository at this point in the history
Extension recommendations for VSC
  • Loading branch information
HLeithner authored Dec 11, 2023
2 parents 6be9533 + a119165 commit 1a228f3
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion versioned_docs/version-4.3/get-started/ide/visual-studio-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,25 @@ Visual Studio Code
## Indentation with Spaces
Joomla uses spaces for indentation. Many people struggle to see the code nesting when the indentation is with spaces instead of tabs. The tab width can be adjusted in the ide but for spaces it is not as simple and you will need to use an extension to provide this functionality. It's not about how it looks, it's about how the brain works and how much time it spends to see nesting.

For Visual Studio Code you can use [Stretchy Spaces]([https://plugins.jetbrains.com/plugin/14849-elastic-indents](https://marketplace.visualstudio.com/items?itemName=kylepaulsen.stretchy-spaces&ssr=false#overview) to adjust the visual width of spaced indents and to come close to the benefits of tabbed indentations.
For Visual Studio Code (VSC) you can use [Stretchy Spaces] ([https://plugins.jetbrains.com/plugin/14849-elastic-indents](https://marketplace.visualstudio.com/items?itemName=kylepaulsen.stretchy-spaces&ssr=false#overview)) to adjust the visual width of spaced indents and to come close to the benefits of tabbed indentations.

## Recommended extensions
VSC is not a "real" IDE in its standard configuration. In order to be able to programme efficiently and stably, it is recommended to extend the functionality with extensions. In the official documentation you can find a chapter about [PHP development in VSC](https://code.visualstudio.com/docs/languages/php). The following extensions are recommended for programming with PHP:

### PHP Intelephense
Intelephense is a high performance PHP language server packed full of essential features for productive PHP development. Some of the most useful features for Joomla development are:

- Workspace wide find all references
- PHPDoc type system
- PSR-12 compatible document/range formatting
- Code folding of definitions, blocks, use declarations, heredoc, comments, and custom regions

PHP Intelephense is a free extension with limited functionality. If you want the full set of functionality you need to purchase a license.
More information about PHP Intelephense, how to use and install it you may find here: https://github.com/bmewburn/vscode-intelephense

### PHP Debug
PHP Debug is a debug adapter between VS Code and Xdebug. It enables debugging code run on a custom local webserver.
If you really want to understand your code or code written by other PHP developers, stepping through the code with Xdebug and observing the content of the variables helps you so much improving your code.
PHP Debug is a free extension.

More information about PHP Debug, how to use and install it you may find here: https://github.com/xdebug/vscode-php-debug

0 comments on commit 1a228f3

Please sign in to comment.