A Neovim configuration for developers who want a LazyVim-based editor with a strong .NET workflow.
This setup aims to make day-to-day C#/.NET development comfortable in Neovim. It uses LazyVim as the foundation and adds Roslyn LSP support through roslyn.nvim, matching the modern Roslyn-based language server approach used by VS Code's C# tooling.
- LazyVim-powered Neovim setup managed by
lazy.nvim. - C# and Razor support through
seblyng/roslyn.nvim. - .NET debugging through
nvim-dap,nvim-dap-ui, and Mason-installednetcoredbg. - Roslyn file watching enabled, with Razor-specific performance tweaks.
- Completion through
blink.cmp, backed by LSP, snippets, buffer, and path sources. - LuaSnip integration with custom VS Code-style snippets for C#, JavaScript, and React.
- Telescope pickers for files, grep, buffers, LSP references, definitions, implementations, diagnostics, symbols, and Git.
- Treesitter highlighting and indentation for common web, scripting, config, and documentation filetypes.
- LazyVim extras for Copilot, DAP, TypeScript, Python, Docker, Markdown, SQL, Tailwind, Terraform, YAML, Prettier, and more.
- Optional terminal file management through
yazi.nvim.
- A recent Neovim version compatible with LazyVim.
- Git.
- .NET SDK for C#/.NET projects.
- Node.js for JavaScript, TypeScript, ESLint, Biome, Prettier, and related tooling.
ripgrepfor Telescope live grep.- A C compiler such as
gccorclangfor Treesitter parser builds. - Optional:
yaziif you want to use the configured terminal file manager integration.
Back up your current Neovim configuration first.
Move-Item $env:LOCALAPPDATA\nvim $env:LOCALAPPDATA\nvim.backup
git clone https://github.com/cpotech/nvim-windows.git $env:LOCALAPPDATA\nvim
nvimmv ~/.config/nvim ~/.config/nvim.backup
git clone https://github.com/cpotech/nvim-windows.git ~/.config/nvim
nvimOn first launch, Lazy will install plugins. If needed, run:
:Lazy syncFor .NET projects, open Neovim from the solution or project root and run dotnet restore before relying on Roslyn diagnostics and navigation.
The debug config asks mason-nvim-dap to install netcoredbg when DAP loads. If needed, run :DapInstall coreclr manually.
The ChatGPT.nvim configuration only supports the Azure Responses API setup below. Set these environment variables before starting Neovim:
$env:OPENAI_API_BASE = "https://ais-sharedai-dev-eus2-743.services.ai.azure.com/openai/v1/responses"
$env:OPENAI_API_KEY = "<your-api-key>"
$env:OPENAI_API_MODEL = "<model-name>"
$env:OPENAI_API_TYPE = "azure"No Azure deployment, API version, or OpenAI host variables are used by this config.
Leader is mapped to <Space>.
| Key | Action |
|---|---|
<leader>ff |
Find files with Telescope |
<leader>fg |
Live grep with Telescope |
<leader>fb |
List open buffers |
<leader>fr |
Find LSP references |
<leader>fi |
Find LSP implementations |
<leader>fd |
Show diagnostics |
<A-d> |
Go to definitions |
<A-r> |
Find references |
<A-i> |
Go to implementation |
<C-h/j/k/l> |
Move between splits |
ss / sv |
Create horizontal / vertical split |
<leader>- |
Open Yazi at the current file |
<F5> |
Start or continue a debug session |
<F8> |
Step out while debugging |
<F9> |
Toggle breakpoint |
<F10> |
Step over while debugging |
<F11> |
Step into while debugging |
init.lua Neovim entry point
lazyvim.json Enabled LazyVim extras
lazy-lock.json Locked plugin versions
lua/config/ Core LazyVim, options, and keymaps
lua/plugins/ Plugin specifications and overrides
snippets/ Custom VS Code-style snippets
syntax/razor.vim Razor syntax support
The Roslyn integration is configured in lua/plugins/roslyn.lua and loads for C# and Razor buffers. Razor buffers intentionally disable several expensive LSP capabilities to keep editing responsive.
This config is intended to be Roslyn-first rather than OmniSharp-first. If you are migrating from OmniSharp, review any project-specific assumptions around analyzers, generated files, and solution loading.
.NET debugging is configured in lua/plugins/dap-dotnet.lua. Build the project first, open Neovim from the solution or project root, set a breakpoint with <F9>, then start with <F5> and choose the DLL from bin/Debug. Use NetCoreDbg: Attach to process for an already-running app.
Issues and pull requests are welcome. Please keep changes focused on improving the LazyVim-based .NET development experience, and avoid committing machine-specific paths, credentials, or private environment details.
This project is licensed under the MIT License. See LICENSE for details.