Skip to content

Compatibility with built in rider support

Rider version: 2024.2RC1
GdScript plugin version: 2.5.6
Bundled plugin version: 242.20224.285

Despite the README.md, I really wanted to get both plugins working for the (IMO) better DX of this plugin while not losing on the LSP support from the Jetbrains plugin.

After poking the internal tools buttons for far too long, I noticed that the Tools -> View PSI Structure of Current File... dialog failed to identify .tscn files as belonging to this plugin. Looking at the Jetbrains plugin, I found that syntax highlighting was provided by textmate bundles. After manually disabling (see workaround) the textmate bundles in the Jetbrains plugin, this plugin began working.

I am not very familiar with plugin development (in fact, this is my first time touching the code of a plugin) so I'm not very sure of either my workaround or my fix. I managed to get both plugins working together by using a bytecode editor to remove the TextMateBackedFileType interface from the ProjectFileType and TscnFileType classes. The only side effect that I have noticed is that the syntax highlighting from the Jetbrains plugin is lost on .godot and .tscn files, the latter being slightly more significant as this plugin does not provide a syntax highlighter for those files. I am, however, unable to create a MR for this fix as I cannot test my code since I lack a dev environment for this project (again, I just used a bytecode editor)

Workaround to disable textmate bundles:

  1. Accept that this is at your own risk, because I don't really know what I'm doing
  2. Go to plugin directory for the Jetbrains plugin (for me its at /home/alexkar598/.local/share/JetBrains/Toolbox/apps/rider/plugins/rider-godot)
  3. Edit dotnet/bundles/godot-tools/extension/package.json
  4. Go to the languages key under the contributes key
    image
  5. In the language object with the gdscene id, add a - after tscn
  6. In the language object with the gdresource id, add a - after godot
  7. It should look like this when you're done:
    image
  8. Save the package.json file
  9. Restart Rider
Edited by alexkar598