Code-server: Broken syntax highlighting on PHP files.

Created on 7 Mar 2019  路  10Comments  路  Source: cdr/code-server


  • code-server version: 1.31.1-100
  • OS Version: Ubuntu 16.04

    Steps to Reproduce

  1. Create a blank PHP file.
  2. Start coding by using if ( isset( $some_variable ) .... You'll notice that the syntax is broken after isset().

Attached to this report you'll find a screenshot related to this as well. Amazing product anyways :+1: :smile:
screenshot from 2019-03-07 22-16-16

bug needs-investigation

Most helpful comment

Vanilla VSCode does seem to work correctly:

All 10 comments

Does this work in vscode?

@kylecarbs we're using vscode's syntax highlighting right so this shouldn't be a bug in code-server?

Correct(ish). We use a wasm port of the library VS Code uses. It's possible there's an issue with that.

Vanilla VSCode does seem to work correctly:

I second NGTmeaty. Here is my vanilla VSCode installation.
vscode-highlight

Def something wrong here. Will investigate.

I need to install php-cli to get php highlighting working without error message. Maybe add php-cli to docker image?

@pwFoo What was the error message that you received?

Without php-cli installed the message is that no php is found. Installed it in console fixes that, but highlighting has delay. It needs some time (maybe a half minute?) until directories and files are colored (local code is initially cloned from git) and code changes from plain to highlighted.

v2 finally fixed this (https://github.com/cdr/code-server/commit/07ec4ca63e5a735315a6cb71f8379556b481924c) by downgrading onigasm https://github.com/NeekSandhu/onigasm/issues/17.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KSXGitHub picture KSXGitHub  路  3Comments

grant picture grant  路  3Comments

avelino picture avelino  路  3Comments

Arsaev picture Arsaev  路  3Comments

broady picture broady  路  3Comments