Skip to content

cpotech/nvim-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET LazyVim Neovim Config

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.

Features

  • 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-installed netcoredbg.
  • 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.

Requirements

  • 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.
  • ripgrep for Telescope live grep.
  • A C compiler such as gcc or clang for Treesitter parser builds.
  • Optional: yazi if you want to use the configured terminal file manager integration.

Installation

Back up your current Neovim configuration first.

Windows

Move-Item $env:LOCALAPPDATA\nvim $env:LOCALAPPDATA\nvim.backup
git clone https://github.com/cpotech/nvim-windows.git $env:LOCALAPPDATA\nvim
nvim

Linux and macOS

mv ~/.config/nvim ~/.config/nvim.backup
git clone https://github.com/cpotech/nvim-windows.git ~/.config/nvim
nvim

On first launch, Lazy will install plugins. If needed, run:

:Lazy sync

For .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.

ChatGPT.nvim Azure Responses setup

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.

Common keymaps

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

Repository layout

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

.NET and Roslyn notes

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.

Contributing

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.

License

This project is licensed under the MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors