A complete, modern Neovim configuration specifically optimized for Unity and C# development. This setup transforms Neovim into a powerful IDE-like experience with intelligent code completion, debugging, and seamless Unity integration.
- ๐ฏ C# LSP Support: OmniSharp integration with full IntelliSense, go-to-definition, and error checking
- ๐ฎ Unity Development: Optimized workflows for Unity projects with debugging support
- ๐ Fuzzy Finding: Telescope integration for lightning-fast file and text searching
- ๐ก Smart Completion: nvim-cmp with context-aware suggestions and snippets
- ๐ Advanced Debugging: DAP with NetCoreDbg for Unity and .NET debugging
- ๐ File Management: Neo-tree file explorer with git integration
- ๐จ Modern UI: Beautiful Tokyo Night theme with smooth animations
- โก Performance: Lazy loading for fast startup times
- ๐ Git Integration: Gitsigns and diffview for comprehensive version control
- lazy.nvim - Modern plugin manager with lazy loading
- plenary.nvim - Lua utility functions
- nvim-lspconfig - LSP configuration helper
- mason.nvim - Package manager for LSP servers
- mason-lspconfig.nvim - Bridge between Mason and lspconfig
- fidget.nvim - LSP progress notifications
- neodev.nvim - Enhanced Lua LSP for Neovim config
- nvim-cmp - Completion engine
- cmp-nvim-lsp - LSP completion source
- cmp-buffer - Buffer completion source
- cmp-path - File path completion
- cmp-cmdline - Command line completion
- LuaSnip - Snippet engine
- cmp_luasnip - Snippet completion source
- friendly-snippets - Pre-built snippets
- telescope.nvim - Fuzzy finder and live grep
- telescope-fzf-native.nvim - FZF integration for faster searching
- neo-tree.nvim - File explorer with git integration
- nvim-web-devicons - File type icons
- nvim-dap - Debug Adapter Protocol client
- nvim-dap-ui - UI for nvim-dap
- nvim-dap-virtual-text - Virtual text for debugging
- nvim-nio - Async I/O library
- nvim-treesitter - Syntax highlighting and parsing
- nvim-treesitter-textobjects - Text objects for treesitter
- gitsigns.nvim - Git decorations and hunk management
- diffview.nvim - Git diff viewer
- tokyonight.nvim - Modern color scheme
- lualine.nvim - Status line
- alpha-nvim - Start screen
- indent-blankline.nvim - Indentation guides
- noice.nvim - Enhanced UI for messages and command line
- nvim-notify - Notification manager
- which-key.nvim - Keybinding hints
- flash.nvim - Enhanced navigation and search
- neoscroll.nvim - Smooth scrolling animations
- conform.nvim - Code formatting
- mini.nvim modules:
- mini.pairs - Auto-close brackets and quotes
- mini.comment - Smart commenting
- mini.ai - Enhanced text objects
- mini.surround - Surround text objects
- mini.bufremove - Better buffer deletion
- vim-illuminate - Highlight word under cursor
- nvim-ts-context-commentstring - Context-aware commenting
- Leader:
<Space>
(spacebar)
Key | Action | Description |
---|---|---|
<Space>ff |
Find Files | Fuzzy find files in project |
<Space><Space> |
Find Files | Alternative find files |
<Space>/ |
Live Grep | Search text in all files |
<Space>sg |
Live Grep | Alternative live grep |
<Space>fb |
Find Buffers | List open buffers |
<Space>, |
Switch Buffer | Quick buffer switcher |
<Space>fr |
Recent Files | Recently opened files |
<Space>fR |
Recent (CWD) | Recent files in current directory |
<Space>e |
Toggle Neo-tree | File explorer |
<Space>fe |
Toggle Neo-tree | Alternative file explorer |
<Space>fE |
Reveal File | Reveal current file in tree |
Key | Action | Description |
---|---|---|
gd |
Go to Definition | Jump to symbol definition |
gr |
Go to References | Find all references |
gi |
Go to Implementation | Jump to implementation |
gt |
Go to Type Definition | Jump to type definition |
K |
Hover Documentation | Show symbol documentation |
<Space>rn |
Rename Symbol | Rename symbol across project |
<Space>ca |
Code Actions | Show available code actions |
<Space>cf |
Format Buffer | Format current buffer |
<Space>cd |
Line Diagnostics | Show diagnostics for current line |
Key | Action | Description |
---|---|---|
<Space>db |
Toggle Breakpoint | Set/remove breakpoint |
<Space>dB |
Conditional Breakpoint | Set conditional breakpoint |
<Space>dc |
Continue | Continue debugging |
<Space>di |
Step Into | Step into function |
<Space>do |
Step Out | Step out of function |
<Space>dO |
Step Over | Step over line |
<Space>dr |
Toggle REPL | Open debug REPL |
<Space>dt |
Terminate | Stop debugging |
<Space>dw |
Debug Widgets | Show debug widgets |
Key | Action | Description |
---|---|---|
<Ctrl>h |
Left Window | Move to left split |
<Ctrl>j |
Down Window | Move to lower split |
<Ctrl>k |
Up Window | Move to upper split |
<Ctrl>l |
Right Window | Move to right split |
<Ctrl>Up |
Resize Up | Increase window height |
<Ctrl>Down |
Resize Down | Decrease window height |
<Ctrl>Left |
Resize Left | Decrease window width |
<Ctrl>Right |
Resize Right | Increase window width |
Key | Action | Description |
---|---|---|
<Shift>h |
Previous Buffer | Switch to previous buffer |
<Shift>l |
Next Buffer | Switch to next buffer |
<Space>bd |
Delete Buffer | Close current buffer |
<Space>bD |
Force Delete | Force close buffer |
<Space>bb |
Other Buffer | Switch to other buffer |
Key | Action | Description |
---|---|---|
jk |
Exit Insert | Exit insert mode |
<Alt>j |
Move Line Down | Move current line down |
<Alt>k |
Move Line Up | Move current line up |
<Ctrl>s |
Save File | Save current file |
s |
Flash Jump | Quick jump to location |
S |
Flash Treesitter | Treesitter-aware jump |
gsa |
Add Surrounding | Add surrounding characters |
gsd |
Delete Surrounding | Remove surrounding characters |
gsr |
Replace Surrounding | Replace surrounding characters |
Key | Action | Description |
---|---|---|
]h |
Next Hunk | Jump to next git hunk |
[h |
Previous Hunk | Jump to previous hunk |
<Space>ghs |
Stage Hunk | Stage current hunk |
<Space>ghr |
Reset Hunk | Reset current hunk |
<Space>ghp |
Preview Hunk | Preview hunk changes |
<Space>ghb |
Blame Line | Show git blame |
<Space>gd |
Git Diff | Open diff view |
Key | Action | Description |
---|---|---|
<Space>sh |
Help Tags | Search help documentation |
<Space>sk |
Keymaps | Search keybindings |
<Space>sc |
Commands | Search available commands |
<Space>ss |
Document Symbols | Search symbols in current file |
<Space>sS |
Workspace Symbols | Search symbols in workspace |
<Space>sw |
Word Under Cursor | Search word under cursor |
Key | Action | Description |
---|---|---|
]d |
Next Diagnostic | Jump to next diagnostic |
[d |
Previous Diagnostic | Jump to previous diagnostic |
]e |
Next Error | Jump to next error |
[e |
Previous Error | Jump to previous error |
]w |
Next Warning | Jump to next warning |
[w |
Previous Warning | Jump to previous warning |
Key | Action | Description |
---|---|---|
<Enter> |
Accept Completion | Confirm selected completion |
<Ctrl>n |
Next Item | Select next completion |
<Ctrl>p |
Previous Item | Select previous completion |
<Ctrl>Space> |
Trigger Completion | Manually trigger completion |
<Ctrl>e |
Abort | Cancel completion |
- Neovim 0.9+ (0.10+ recommended for best experience)
- Git - For plugin management and version control
- Node.js - Required for some language servers
- .NET SDK - For C# development and OmniSharp
- ripgrep - For fast text searching (install via package manager)
- make - For building telescope-fzf-native (Windows: install via chocolatey)
# Backup existing config
mv ~/.config/nvim ~/.config/nvim.backup
# Clone this configuration
git clone https://github.com/Arbint/Nvim-Unity.git ~/.config/nvim
# Start Neovim
nvim
# Backup existing config
mv $env:LOCALAPPDATA\nvim $env:LOCALAPPDATA\nvim.backup
# Clone this configuration
git clone https://github.com/Arbint/Nvim-Unity.git $env:LOCALAPPDATA\nvim
# Start Neovim
nvim
- Open Neovim - Lazy.nvim will automatically install plugins
- Install Language Servers: Run
:Mason
and install:omnisharp
(C# LSP)netcoredbg
(C# debugger)csharpier
(C# formatter)
- Restart Neovim to ensure everything loads correctly
- Test C# Features: Open a
.cs
file and verify LSP is working with:LspInfo
- Open Unity Project: Navigate to your Unity project root and run
nvim
- LSP Attachment: OmniSharp will automatically detect your project and provide IntelliSense
- File Navigation: Use
<Space>ff
to quickly navigate between scripts - Symbol Search: Use
<Space>ss
to find classes, methods, and properties
- Set Breakpoints: Use
<Space>db
to toggle breakpoints in your scripts - Attach Debugger: Configure Unity to accept external debuggers
- Start Debugging: Use
<Space>dc
to start the debugging session - Debug Controls: Use step into (
<Space>di
), step over (<Space>dO
), and continue (<Space>dc
)
- Auto-formatting: Files automatically format on save with CSharpier
- Real-time Diagnostics: Errors and warnings appear immediately
- Code Actions: Use
<Space>ca
for quick fixes and refactoring - Symbol Renaming: Use
<Space>rn
to rename symbols across the entire project
Edit lua/plugins/ui.lua
and modify the tokyonight configuration:
opts = { style = "storm" }, -- Options: storm, moon, night, day
Add custom keybindings in lua/config/keymaps.lua
:
map("n", "<leader>custom", "<cmd>YourCommand<cr>", { desc = "Your Description" })
- Run
:Mason
- Search for your language server
- Press
i
to install - Configure in
lua/plugins/lsp.lua
- Check if you're in a C# file (
.cs
extension) - Run
:LspInfo
to see attached servers - Install OmniSharp via
:Mason
- Check
:LspLog
for error messages - Restart Neovim after installing language servers
- Ensure you're in a project directory
- Install ripgrep for better performance
- Check if git is available (Telescope uses git for file listing)
- Verify NetCoreDbg is installed via
:Mason
- Ensure your Unity project is configured for external debugging
- Check firewall settings if debugging over network
- Update to Neovim 0.10+ for better performance
- Check for conflicting plugins
- Use
:Lazy profile
to identify slow-loading plugins
- Neovim Documentation:
:help
or neovim.io - Vim Motions:
:Tutor
for interactive Vim tutorial - LSP Features:
:help lsp
for Language Server Protocol documentation - Plugin Documentation: Use
<Space>sh
to search help for specific plugins
Feel free to open issues and pull requests to improve this configuration. When contributing:
- Test Changes: Ensure modifications work with Unity projects
- Document Updates: Update this README for new features
- Follow Conventions: Maintain consistent code style and structure
This configuration is open source and available under the MIT License. Feel free to use, modify, and share!
Happy Unity Development with Neovim! ๐ฎโก