Opinionated Neovim config for Unity + C# development on macOS and Linux.
- Supported:
macOS,Linux - Unsupported:
Windows(not planned)
- Roslyn LSP setup for C#
- Unity attach debug flow (
nvim-dap+ Unity debug adapter) - Unity -> Neovim file opening via socket session scripts
- JetBrains CleanupCode integration for C# formatting
- LazyVim extras for
.NET+DAP
nviminPATHgit.NET SDK(dotnet)- Unity project with exactly one IDE package:
com.unity.ide.visualstudioorcom.unity.ide.rider
Optional but recommended:
roslyn-language-server- JetBrains
jbCLI (forCleanupCode) - terminal app available in
PATH(ghostty,kitty,wezterm,alacritty,gnome-terminal,konsole,x-terminal-emulator, orxterm)
- Clone to
~/.config/nvim. - Start
nvimonce to let Lazy install plugins. - Configure Unity External Tools with
External Script Editor = <path-to-your-nvim-config>/bin/unity-nvim-openandExternal Script Editor Args = $(File) $(Line) $(Column). - Start Neovim Unity session with
<path-to-your-nvim-config>/bin/unity-nvim-session.
Detailed Unity setup also in UNITY_SETUP.md.
<leader>dU: attach Unity editor (auto endpoint)<leader>dE: attach Unity editor (manual endpoint)<leader>cC: run JetBrains CleanupCode
UNITY_NVIM_BIN: explicit Neovim executable pathUNITY_NVIM_SOCKET: socket path overrideUNITY_NVIM_TERMINAL_CMD: terminal launch command when no session existsUNITY_NVIM_TERMINAL_APP: macOS app name/path used withopen -na ... --argsfallback (default:Terminal)UNITY_NVIM_EXTRA_PATH: extraPATHentries for Roslyn/CleanupCode (:separated)DOTNET_ROOT: explicit .NET root if auto-detection failsJB_CLEANUPCODE_BIN: explicitjbexecutable
Linux examples:
export UNITY_NVIM_TERMINAL_CMD='ghostty -e'
# or
export UNITY_NVIM_TERMINAL_CMD='kitty -e'macOS example:
export UNITY_NVIM_TERMINAL_CMD='open -na Terminal --args'Merge only Unity/C# layer instead of replacing whole config:
bin/unity-nvim-openbin/unity-nvim-sessionbin/csharp-cleanupcodelua/plugins/csharp.lualua/plugins/csharp_format.lualua/plugins/unity_dap.lua
- Unity opens nothing: ensure
unity-nvim-sessionis running and socket path matches. - LSP missing: verify
dotnetandroslyn-language-serverare inPATH. - CleanupCode fails: install
jbor setJB_CLEANUPCODE_BIN. - No terminal launch from Unity: set
UNITY_NVIM_TERMINAL_CMDexplicitly.
See LICENSE.