How can I add TYPO3 Library to Visual Studio Code?
Asked Answered
O

1

0

I installed Visual Studio Code with Homebrew Cask Tap and started to code. Now I miss the autocompletion for TYPO3 Classes.

How can I add the TYPO3 Library from eg TYPO3 9.5 to my workspace that my autocompletion works for TYPO3 Classes?

Explanation:

With other IDEs where I adde the TYPO3 Source I could press CMD MOUSE-LEFT (on MAC) on eg. AbstractViewHelper in the Examplecode and my IDE jumps to the destinated Class.

Examplecode:

<?php
namespace MonTea\MonteaBase\ViewHelpers\Format;

class PhonenumberViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
{

Perhaps it's important:

I use the VS Code Version 1.28.2 (1.28.2).

Oza answered 18/10, 2018 at 22:16 Comment(0)
O
1

I found a way to do this with Visual Studio Code:

  • First I installed the extension: PHP Intelephense V.0.8.8.
  • Then I add the TYPO3 Source folder to my Workspace
  • Now I can hop with CMD + Click to all the TYPO3 Classes, but there are more Classes e.g. in the ConnectionPool Class the Doctrine\DBAL\DriverManager

I think sometimes it's also usefull to jump into "third-party-classes" that are used by TYPO3.

  • I go to the terminal
  • Switch to the TYPO3 SRC PATH
  • Do composer install

And now I can also jump to the "third-party-classes".

Visual Studio Code is near an IDE i want to work with. ;)

supplement

I also can hop inside my extensions, if they are in the same workspace. Thanks to the Intelephense Extension.

Oza answered 25/10, 2018 at 19:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.