App development in VS Code: Stubs available?

Hey there,

I’m using VS Code, among other things to develop my Nextcloud apps.

Recently, I discovered Intelephense, which is a nice extension for VS Code that will add Intellisense.

However, it doesn’t include any presets (I think they’re called “stubs”) for Nextcloud.

I found this package christophwurst/nextcloud - Packagist by @ChristophWurst, but not sure if or how it could be used as a stub?

Did anyone set this up successfully or are you all just using other editors :smile:

– Thomas

Okay, nevermind :see_no_evil: I solved it :white_check_mark:

I found this issue and apparently, you can simply pass a path where it searches for definitions in the VS Code settings for Intelephense.

So I linked it to my local nextcloud git repository, by adding those two paths. Maybe more will be needed, I will experiment a bit with this.

/Applications/MAMP/htdocs/nextcloud-server/core
/Applications/MAMP/htdocs/nextcloud-server/lib

1 Like