7 min read #tools #nvim

Neovim Overview

The editor is Neovim, built on top of LazyVim. I chose a distribution rather than building from scratch because LSP, Treesitter, formatting, and debugging are already well-configured by others; there's no need for me to reinvent the wheel. The trade-off is that my own configuration is very thin—init.lua consists of just one line. What truly belongs to me are a few settings in lua/config/options.lua, the languages enabled in lazyvim.json, and about a dozen plugins added in lua/plugins/ (discussed in the next post).

Languages are basically "just enable the extra and you're set"—each lang.* extra in LazyVim configures the corresponding LSP, Treesitter parser, formatter, and DAP all at once; I only need to enable them in lazyvim.json. Here are the ones I typically use:

  • rust → rustaceanvim (offers runnables/debuggables, macro expansion, and :RustLsp beyond bare rust-analyzer) + crates.nvim for version hints in Cargo.toml.
  • go → gopls + delve debugging + automatic goimports.
  • dotnet / C# → uses roslyn.nvim, which is more stable than omnisharp for large solutions.
  • clangd → LSP for C/C++, with cross-compilation unit navigation and clang-format integration via .clang-format.
  • java → jdtls (it's an LSP derived from Eclipse, so startup is somewhat heavy).
  • typescript → vtsls, providing completion, renaming, and code actions for frontend projects.

The benefit of enabling extras rather than configuring manually is that LazyVim provides sensible defaults for which LSP version to install, how to connect formatters, and where DAP adapters come from. I don't need to rewrite boilerplate for every language.

There are three settings in options that are defined according to my workflow and worth mentioning separately:

Clipboard uses OSC52 — copying via terminal escape sequences. This means that even under SSH or Wayland, yanked text can enter the system clipboard, without relying on the often problematic xclip/wl-copy chain.

autoformat is turned off. I dislike silently modifying many things upon saving; I prefer manual triggering or project-level triggers to avoid mixing irrelevant formatting diffs into commits.

It also detects Windows, switching the shell to pwsh and configuring UTF-8 when encountered. The same configuration runs seamlessly on that Windows machine via chezmoi.

The last crucial point isn't in options but is important: Ctrl+hjkl for window switching, with boundary crossing into Zellij panes, implemented via smart-splits (at_edge='stop' prevents dead-end bouncing). The editor and the multiplexer share the same movement keys, which sets the tone for my entire environment.