Che: LS for default PHP stacks not working

Created on 2 Mar 2020  路  6Comments  路  Source: eclipse/che

Describe the bug

PHP default stacks don't have any Language support. Code highlighting, error highlighting, code completion etc.

Che version

  • [x] latest 7.9.0
  • [ ] nightly
  • [ ] other: please specify

Steps to reproduce

  • Go to Workspace -> Add Worksapce
  • Create and open PHP Symfony workspace
  • Open file symfony-demo-application/src/Controler/BlogController.php
  • No LS features are provided.

Expected behavior

Code should be highlighted according PHP syntax and LS features as error highlighting or code completion should work.

Runtime

  • [ ] kubernetes (include output of kubectl version)
  • [x] Openshift (include output of oc version) Hosted Che
  • [ ] minikube (include output of minikube version and kubectl version)
  • [ ] minishift (include output of minishift version and oc version)
  • [ ] docker-desktop + K8S (include output of docker version and kubectl version)
  • [ ] other: (please specify)

Screenshots

Screenshot from 2020-03-02 11-51-35

Some browser console logs errors that could be related to the problem:
Screenshot from 2020-03-02 11-48-50

arelanguages kinbug severitP1 tealanguages

All 6 comments

@tsmaeder could you please take a look?

I think the problem is that when we switched to using the vscode builtins in che-theia we don't provide a PHP language configuration: https://github.com/eclipse/che-theia/blob/master/generator/src/templates/theiaPlugins.json. Since the PHP filetype is no longer be there the PHP language features won't activate when a PHP file is opened.

When I tested on the 7.10.0-SNAPSHOT and opened up BlogController.php the default language configuration is set to plain text (since PHP is missing) so there also won't be syntax colourization

Related issues:
https://github.com/eclipse-theia/theia/issues/6672
https://github.com/eclipse/che/issues/16114

Can this be worked around by manually opening a file and setting its type to php? Does the PHP plugin depend on vscode/theia for initialization only or also for finding files?

Can this be worked around by manually opening a file and setting its type to php?

Unfortunately not, since we removed the @theia/textmate-grammers package the PHP filetype that is associated with the syntax colourization etc doesn't get added to Theia and since we don't have the vscode-builtin-php we technically don't have a "real" PHP language configuration. For some reason there is a php filetype that is available but I believe it's only coming from files extension type of BlogController.php

Does the PHP plugin depend on vscode/theia for initialization only

I think it has to be activated by vscode/theia since activation events is defined in the vscode extension

There is a PR here: https://github.com/eclipse/che-theia/pull/648 but Github doesn't autolink it.

Closing as https://github.com/eclipse/che-theia/pull/648 has now been merged

Was this page helpful?
0 / 5 - 0 ratings

Related issues

redeagle84 picture redeagle84  路  3Comments

johnmcollier picture johnmcollier  路  3Comments

Ohrimenko1988 picture Ohrimenko1988  路  3Comments

amisevsk picture amisevsk  路  3Comments

JamesDrummond picture JamesDrummond  路  3Comments