theia-ide / theia-ruby-extension

Theia extension to support Ruby.
Eclipse Public License 2.0
3 stars 7 forks source link

Syntax Highlighting Not Working #4

Open caseyflynn-google opened 5 years ago

caseyflynn-google commented 5 years ago

When attempting to use this extension with Theia 0.3.14 the following error is thrown:

ERROR Could not initialize contribution TypeError: e.registerTextMateGrammarScope is not a function

It appears that syntax suggestion works, however syntax highlighting is not functional.

To reproduce the issue use the following package.json:

{
  "private": true,
  "name": "theia-ruby-test",
  "version": "0.0.1",
  "dependencies": {
    "@theia/core": "^0.3.14",
    "@theia/editor": "^0.3.14",
    "@theia/filesystem": "^0.3.14",
    "@theia/keymaps": "^0.3.14",
    "@theia/languages": "^0.3.14",
    "@theia/markers": "^0.3.14",
    "@theia/messages": "^0.3.14",
    "@theia/metrics": "^0.3.14",
    "@theia/monaco": "^0.3.14",
    "@theia/navigator": "^0.3.14",
    "@theia/preferences": "^0.3.14",
    "@theia/process": "^0.3.14",
    "@theia/ruby": "^0.1.0",
    "@theia/textmate-grammars": "^0.3.14",
    "@theia/variable-resolver": "^0.3.14",
    "@theia/workspace": "^0.3.14"
  },
  "devDependencies": {
    "@theia/cli": "latest"
  },
  "scripts": {
    "prepare": "theia build",
    "start": "theia start",
    "watch": "theia build --watch"
  },
  "theia": {
    "target": "browser"
  }
}

Install and run with the following command

yarn && yarn prepare && yarn start

The error can be viewed via debugging tools. Upon opening a .rb file, you can see syntax highlighting is not functional.

wilford commented 5 years ago

Don't support anyone is looking at this one?

littlej247 commented 3 years ago

It has changed a lot since this post, I believe it uses plugins for syntax highlighting now. I've often had the same issue due to it not loading the plugings directy even when it's specified in the package.json. You can specify it with the --plugins flag. ie:

`yarn theia start --port:3000 --hostname 127.0.0.1 --mode development --plugins=local-dir:/home/josh/theia/plugins`