Translates JetBrains Rider invocations to emacsclient invocations (for Unity)

Overview

rider2emacs

What?

rider2emacs is a command-line utility which translates JetBrains Rider invocations to emacsclient invocations.

Why?

The Unity game engine editor only officially supports four IDEs/editors: MonoDevelop, Visual Studio, Visual Studio Code, and JetBrains Rider. If and only if the Unity editor is configured to open source files in one of these editors will it generate sln and csproj files for your code. If you want to use any other editor, including the best text editor, Emacs, with the OmniSharp LSP, you must convince Unity that you're using one of the four editors listed above.

It gets worse: support for each of the above editors each generate project/solution files completely differently from one another, and the ability for OnniSharp to correctly interpret these project and solution files varies just as much. The best of the bunch seems to be the Rider project generation.

Why not just use a shell script or something?

Making this a shell script would more or less make this impossible for Windows users. My first shot at this was done in C for portability reasons and to reduce the dependency tree. However, the amount of *printf* calls, string manipulation, and platform-specific code required for what is on paper a very simple shim made me uncomfortable. Unfortunately, this means that installation of unity.el is slightly more complex than I would have liked.

Usage

Now that I have justified why this tool even needs to exist in the first place, here's how to use it.

Install rider2emacs via:

cargo intall rider2emacs

In Unity, navigate to Edit->Preferences..., select the External Tools tab in the left-side pane, and select Browse... in the drop-down menu for External Script Editor.

Navigate to the rider2emacs binary. It will have been installed in $CARGO_INSTALL_ROOT/bin, which by default is $HOME/.cargo/bin. See the documentation on cargo install for more details.

Since the file starts with rider, Unity will be tricked into thinking that it's actually JetBrains Rider. Congratulations! Any source files you open via Unity should now open in Emacs via emacsclient. Ensure you have the Emacs daemon running. See "(emacs)Emacs Server", accessible in the Emacs manual via {C-h r} under "Advanced Features".

Troubleshooting

emacsclient (or emacsclientw.exe on Windows) must be in your $PATH for rider2emacs to correctly invoke it. On non-Windows platforms, emacsclient is invoked via /bin/sh so that environment variables set in your .profile and similar are taken into account. This is important on macOS, which does not provide a robust way to set $PATH for a GUI session, unlike Linux/FreeBSD.

See Also

You might also like...
Blazingly fast Rust CLI app to sync data from a folder of excel workbooks into generated c# code for unity usage
Blazingly fast Rust CLI app to sync data from a folder of excel workbooks into generated c# code for unity usage

Extensions supported ( .xls, .xlsx, .xlsm, .xlsb, .xla, .xlam, .ods ) Speed Test Image shows the results of 5000defs synced from 2 workbooks and 5 she

Owner
Eliza
Eliza
realize XPBD with rust and render in Unity

XPBD Simulation with Rust & Unity 上次看了XPBD的论文,最近又恰好在学习Rust,于是就想着用Rust来实现一个XPBD Solver练一下手,正好一箭双雕。 XPBD结论公式可参考此篇 - XPBD论文解读(Extended Position-Based Dyn

zilch 23 Nov 15, 2022
Port of my AST3 asteroids clone Bevy/rust from Unity/C#.

Port of my AST3 asteroids clone Bevy/rust from Unity/C#. This is my first rust program. Be gentle. Still working on it, but actually playable. You can

Jorge Monasterio 2 Mar 24, 2022
Implements the Smart Contract for the Unity Proposal.

cw-unity-prop A CosmWasm Smart Contract to implement the Juno Unity Prop. For information on verifying the on-chain smart contract, see VERIFYING.md.

Junø 5 Apr 27, 2022
The project brings the IC ecosystem to Unity, allowing Unity developers to call the functions of canisters on IC,

Agent of Internet Computer for Unity The Intro The project brings the IC ecosystem to Unity, allowing Unity developers to call the functions of canist

Shiku Labs 9 Nov 18, 2022
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
Rust version of the Haskell ERD tool. Translates a plain text description of a relational database schema to dot files representing an entity relation diagram.

erd-rs Rust CLI tool for creating entity-relationship diagrams from plain text markup. Based on erd (uses the same input format and output rendering).

Dave Challis 32 Jul 25, 2022
a prototype crate for creating modular and performant 3D CPU particle systems, inspired by Unity's Shuriken Particle System.

bevy_prototype_particles This is a prototype crate for creating modular and performant 3D CPU particle systems, inspired by Unity's Shuriken Particle

James Liu 28 Sep 12, 2022
realize XPBD with rust and render in Unity

XPBD Simulation with Rust & Unity 上次看了XPBD的论文,最近又恰好在学习Rust,于是就想着用Rust来实现一个XPBD Solver练一下手,正好一箭双雕。 XPBD结论公式可参考此篇 - XPBD论文解读(Extended Position-Based Dyn

zilch 23 Nov 15, 2022
Port of my AST3 asteroids clone Bevy/rust from Unity/C#.

Port of my AST3 asteroids clone Bevy/rust from Unity/C#. This is my first rust program. Be gentle. Still working on it, but actually playable. You can

Jorge Monasterio 2 Mar 24, 2022
Implements the Smart Contract for the Unity Proposal.

cw-unity-prop A CosmWasm Smart Contract to implement the Juno Unity Prop. For information on verifying the on-chain smart contract, see VERIFYING.md.

Junø 5 Apr 27, 2022