UnityNeovimOpener is a Python script designed to integrate Unity with Neovim. It allows Unity to open scripts in Neovim, and directly jump to a specific line number. This is particularly useful for developers who use Neovim as their primary code editor and are working on Unity projects.
Warning! Only tested on Windows.
- Opens files from Unity in Neovim.
- Jumps to specific line numbers in Neovim, matching Unity's editor behavior.
Before you begin, ensure you have met the following requirements:
- You have installed Neovim.
- You have Python installed on your system.
To use UnityNeovimOpener with Unity, follow these steps:
-
Place the
UnityNeovimOpener.pyscript in a suitable location on your system. -
Open Unity and go to
Edit>Preferences. -
Navigate to the
External Toolssection. -
Set the External Script Editor to your Python interpreter path (e.g.,
C:\Path\To\Python\python.exe). -
In the External Script Editor Args field, enter the following arguments:
Path\To\UnityNeovimOpener.py "$(File)" "$(Line)"
Replace Path\To\ with the actual path where you saved the script.
... or, if installed Python from MS Store, just put those values:
External Script Editor: UnityNeovimOpener.py (select the file)
External Script Editor Args:
The first time you open a script the system will ask you what to use to open .py file, select Python app.
Once configured, opening a script from Unity will automatically launch Neovim and navigate to the specified line number (if any).
To contribute to UnityNeovimOpener, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>. - Make your changes and commit them:
git commit -m '<commit_message>' - Push to the original branch:
git push origin <project_name>/<location> - Create the pull request.
Alternatively, see the GitHub documentation on creating a pull request.
If you want to contact me, you can reach me at inbox@potatogam.es.