eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.98k stars 2.5k forks source link

PHP Syntax Highlighting #7651

Closed Evanslooten closed 4 years ago

Evanslooten commented 4 years ago

For some reason, I had to rebuild my containers this morning. Afterward, Theia is not doing any syntax highlighting for PHP files. When I run the container, in the console I see the following errors which I believe may be related.

I am using Laradock.

ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.html]: Language for 'source.smarty' not found. ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.markdown]: Language for 'meta.embedded.block.php' not found. ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.markdown]: Language for 'meta.embedded.block.vs_net' not found. ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.markdown]: Language for 'meta.embedded.block.dosbatch' not found. ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.markdown]: Language for 'meta.embedded.block.coffee' not found. ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.markdown]: Language for 'meta.embedded.block.diff' not found. ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.markdown]: Language for 'meta.embedded.block.objc' not found. ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.markdown]: Language for 'meta.embedded.block.scala' not found.

vince-fugnitto commented 4 years ago

@Evanslooten without any additional information it is hard to help unfortunately. Do you mind sharing your application’s package.json?

Evanslooten commented 4 years ago
{
    "private": true,
    "theia": {
        "frontend": {
            "config": {
                "applicationName": "Theia JavaScript/TypeScript Example",
                "preferences": {
                    "files.enableTrash": false
                }
            }
        }
    },
    "dependencies": {
        "@theia/callhierarchy": "next",
        "@theia/debug": "next",
        "@theia/editor-preview": "next",
        "@theia/file-search": "next",
        "@theia/getting-started": "next",
        "@theia/git": "next",
        "@theia/json": "next",
        "@theia/markers": "next",
        "@theia/messages": "next",
        "@theia/mini-browser": "next",
        "@theia/navigator": "next",
        "@theia/outline-view": "next",
        "@theia/plugin": "next",
        "@theia/plugin-ext": "next",
        "@theia/plugin-ext-vscode": "next",
        "@theia/preferences": "next",
        "@theia/preview": "next",
        "@theia/search-in-workspace": "next",
        "@theia/terminal": "next",
        "@theia/vsx-registry": "next"
    },
    "devDependencies": {
        "@theia/cli": "next"
    },
    "resolutions": {
        "vscode-json-languageserver": "1.2.2",
        "vscode-languageserver-protocol": "3.15.0-next.9",
        "vscode-languageserver-types": "3.15.0-next.5",
        "**/vscode-json-languageserver/**/vscode-languageserver": "6.0.0-next.1"
    },
    "theiaPluginsDir": "plugins",
    "theiaPlugins": {
        "vscode-builtin-bat": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/bat-1.39.1-prel.vsix",
        "vscode-builtin-clojure": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/clojure-1.39.1-prel.vsix",
        "vscode-builtin-coffeescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/coffeescript-1.39.1-prel.vsix",
        "vscode-builtin-configuration-editing": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/configuration-editing-1.39.1-prel.vsix",
        "vscode-builtin-cpp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/cpp-1.39.1-prel.vsix",
        "vscode-builtin-csharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/csharp-1.39.1-prel.vsix",
        "vscode-builtin-css": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/css-1.39.1-prel.vsix",
        "vscode-builtin-debug-auto-launch": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/debug-auto-launch-1.39.1-prel.vsix",
        "vscode-builtin-docker": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/docker-1.39.1-prel.vsix",
        "vscode-builtin-emmet": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/emmet-1.39.1-prel.vsix",
        "vscode-builtin-fsharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/fsharp-1.39.1-prel.vsix",
        "vscode-builtin-go": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/go-1.39.1-prel.vsix",
        "vscode-builtin-groovy": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/groovy-1.39.1-prel.vsix",
        "vscode-builtin-grunt": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/grunt-1.39.1-prel.vsix",
        "vscode-builtin-gulp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/gulp-1.39.1-prel.vsix",
        "vscode-builtin-handlebars": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/handlebars-1.39.1-prel.vsix",
        "vscode-builtin-hlsl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/hlsl-1.39.1-prel.vsix",
        "vscode-builtin-html": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/html-1.39.1-prel.vsix",
        "vscode-builtin-ini": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ini-1.39.1-prel.vsix",
        "vscode-builtin-jake": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/jake-1.39.1-prel.vsix",
        "vscode-builtin-java": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/java-1.39.1-prel.vsix",
        "vscode-builtin-javascript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/javascript-1.39.1-prel.vsix",
        "vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix",
        "vscode-builtin-less": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/less-1.39.1-prel.vsix",
        "vscode-builtin-log": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/log-1.39.1-prel.vsix",
        "vscode-builtin-lua": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/lua-1.39.1-prel.vsix",
        "vscode-builtin-make": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/make-1.39.1-prel.vsix",
        "vscode-builtin-markdown": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-1.39.1-prel.vsix",
        "vscode-builtin-merge-conflicts": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/merge-conflict-1.39.1-prel.vsix",
        "vscode-builtin-npm": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/npm-1.39.1-prel.vsix",
        "vscode-builtin-node-debug": "https://github.com/theia-ide/vscode-node-debug/releases/download/v1.35.3/node-debug-1.35.3.vsix",
        "vscode-builtin-node-debug2": "https://github.com/theia-ide/vscode-node-debug2/releases/download/v1.33.0/node-debug2-1.33.0.vsix",
        "vscode-builtin-objective-c": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/objective-c-1.39.1-prel.vsix",
        "vscode-builtin-perl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/perl-1.39.1-prel.vsix",
        "vscode-builtin-powershell": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/powershell-1.39.1-prel.vsix",
        "vscode-builtin-pug": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/pug-1.39.1-prel.vsix",
        "vscode-builtin-python": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/python-1.39.1-prel.vsix",
        "vscode-builtin-r": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/r-1.39.1-prel.vsix",
        "vscode-builtin-razor": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/razor-1.39.1-prel.vsix",
        "vscode-builtin-ruby": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ruby-1.39.1-prel.vsix",
        "vscode-builtin-rust": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/rust-1.39.1-prel.vsix",
        "vscode-builtin-scss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/scss-1.39.1-prel.vsix",
        "vscode-builtin-shaderlab": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shaderlab-1.39.1-prel.vsix",
        "vscode-builtin-shellscript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shellscript-1.39.1-prel.vsix",
        "vscode-builtin-sql": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/sql-1.39.1-prel.vsix",
        "vscode-builtin-swift": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/swift-1.39.1-prel.vsix",
        "vscode-builtin-theme-abyss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-abyss-1.39.1-prel.vsix",
        "vscode-builtin-theme-defaults": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-defaults-1.39.1-prel.vsix",
        "vscode-builtin-theme-kimbie-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-kimbie-dark-1.39.1-prel.vsix",
        "vscode-builtin-theme-monokai": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-1.39.1-prel.vsix",
        "vscode-builtin-theme-dimmed": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-dimmed-1.39.1-prel.vsix",
        "vscode-builtin-theme-quietlight": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-quietlight-1.39.1-prel.vsix",
        "vscode-builtin-theme-red": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-red-1.39.1-prel.vsix",
        "vscode-builtin-theme-solarized-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-solarized-dark-1.39.1-prel.vsix",
        "vscode-builtin-theme-tomorrow-night-blue": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-tomorrow-night-blue-1.39.1-prel.vsix",
        "vscode-builtin-typescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-1.39.1-prel.vsix",
        "vscode-builtin-typescript-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-language-features-1.39.1-prel.vsix",
        "vscode-builtin-vb": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vb-1.39.1-prel.vsix",
        "vscode-builtin-icon-theme-seti": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vscode-theme-seti-1.39.1-prel.vsix",
        "vscode-builtin-xml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/xml-1.39.1-prel.vsix",
        "vscode-builtin-yaml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/yaml-1.39.1-prel.vsix",
        "vscode-editorconfig": "https://github.com/theia-ide/editorconfig-vscode/releases/download/v0.14.4/EditorConfig-0.14.4.vsix",
        "vscode-eslint": "https://github.com/theia-ide/vscode-eslint/releases/download/release%2F2.0.15/vscode-eslint-2.0.15.vsix"
    }
}
vince-fugnitto commented 4 years ago

@Evanslooten it does not look like you've included php in the list of plugins (theiaPlugins) entry of your package.json. You can include vscode-builtin-php, it provides syntax highlighting for php files.

Evanslooten commented 4 years ago

This configuration is generated by Laradock, which hasn't changed. Up until today, the code highlighting was working, so I believe it may already be part of the build. Plus this error makes me think something from vscode is loading a php specific library.

ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.markdown]: Language for 'meta.embedded.block.php' not found.

vince-fugnitto commented 4 years ago

This configuration is generated by Laradock, which hasn't changed.

There is nothing present in the package.json that would contribute syntax highlighting, and since I am unsure about the history of the configuration I cannot tell for certain why it was working before. I suspect it used to use the deprecated @theia/textmate-grammars extension (which contributes syntax highlighting for a large number of languages).

Plus this error makes me think something from vscode is loading a php specific library. ide-theia_1 | root ERROR [6cfeae16-b080-4d31-9e8f-6d38b3936e81][vscode.markdown]: Language for 'meta.embedded.block.php' not found.

The error is related to markdown files only, when using embedded languages (guard when using backticks) not php syntax highlighting.

vince-fugnitto commented 4 years ago

If this is the file you're referencing, then the base image is incorrect and used to include @theia/texmate-grammars but it no longer does (reason why php syntax highlighting was present and no longer is):

Evanslooten commented 4 years ago

OK thank you for the information. I will poke around and see what I can figure out.

vince-fugnitto commented 4 years ago

OK thank you for the information. I will poke around and see what I can figure out.

No problem! The theia-php image might be a better candidate as a base image.

Evanslooten commented 4 years ago

Switching to that image corrected my issue. Thanks a bunch for your help!