Neovim Configuration

A fast, TypeScript/JavaScript-focused Neovim setup built on NvChad v2.5, with automatic macOS theme syncing, an oxc-powered lint/format toolchain, and Zellij pane integration.

This config lives at nvim/ inside my dotfiles monorepo, alongside my shell, terminal, and macOS tooling.

Highlights

  • System-aware theming — reads macOS's AppleInterfaceStyle at startup and switches between github_dark / github_light automatically (same detection logic reused for toggleterm's shading)
  • oxc-first JS/TS toolchain — oxlint for linting and a custom oxfmt formatter wired into conform.nvim, with typescript-tools.nvim driving a fast tsserver instance (no ts_ls from Mason) and dedicated auto-import commands
  • Custom dashboard — the NvDash home screen is rewritten to list recent files and recent projects (tracked via an autocommand) with single-letter jump keys
  • Zellij-aware navigation — <C-hjkl> moves between Neovim splits and Zellij panes seamlessly
  • Tuned Noice UI — command line, popupmenu, and LSP hover/signature are routed through noice.nvim, with noisy LSP progress and "no results" messages filtered out
  • Discord Rich Presence — toggle on demand with :DiscordRichPresence (wraps cord.nvim)
  • Mason-managed tooling — LSP servers, linters, and formatters are declared once in chadrc.lua and auto-installed

Requirements

  • Neovim >= 0.10.0
  • Git
  • Nerd Font (JetBrains Mono, set as guifont)
  • Node.js (for LSP servers)
  • ripgrep (Telescope live grep)
  • Zellij (optional, for pane navigation)

Installation

This config is part of a larger dotfiles repo, so nvim/ is a subdirectory rather than a standalone repo root.

# Backup any existing config
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak

# Clone the dotfiles repo and symlink the nvim config
git clone git@github.com:UgolinOlle/dotfiles.git ~/dotfiles
ln -s ~/dotfiles/nvim ~/.config/nvim

# Start Neovim — plugins and Mason tools install automatically
nvim

Structure

nvim/
├── init.lua                 # Entry point, lazy.nvim bootstrap
├── .stylua.toml             # Lua formatting rules
├── .neoconf.json             # neodev/neoconf settings for lua_ls
├── lua/
│   ├── chadrc.lua           # NvChad config: theme detection, UI, Mason tool list
│   ├── options.lua          # Vim options
│   ├── mappings.lua         # Key mappings
│   ├── autocmds.lua         # Autocommands
│   ├── commands.lua         # Custom user commands (DiscordRichPresence)
│   ├── configs/
│   │   ├── conform.lua      # Formatter configuration (oxfmt, prettier, stylua...)
│   │   ├── lspconfig.lua    # LSP server setup + import keymaps
│   │   ├── lint.lua         # nvim-lint (oxlint) configuration
│   │   ├── noice.lua        # Noice UI + message filtering
│   │   ├── nvdash.lua       # Custom dashboard (recent files/projects)
│   │   ├── lazy.lua         # lazy.nvim options
│   │   ├── cmp.lua          # Completion configuration
│   │   └── luasnip.lua      # Snippet configuration
│   └── plugins/
│       ├── init.lua         # Plugin specifications
│       ├── telescope.lua    # Telescope + ui-select setup
│       └── gitgraph.lua     # Git graph plugin

Plugins

CategoryPluginPurpose
CoreNvChadBase configuration framework
LSPnvim-lspconfigLSP client configuration
mason.nvim + mason-lspconfigLSP/lint/format tool installer
typescript-tools.nvimFast TS/JS server, auto-import, code fixes
nvim-lspimportCross-language auto-import
Completionnvim-cmpAutocompletion engine
LuaSnip + friendly-snippetsSnippet engine + snippet collection
nvim-autopairsAuto-close brackets, cmp integration
Formatting/Lintingconform.nvimFormatter runner, format-on-save
nvim-lintAsync linting (oxlint)
UInoice.nvimCommand line, popupmenu, LSP hover UI
nvim-notifyNotification manager
indent-blankline.nvimIndent guides
markview.nvimMarkdown preview
nvim-web-deviconsFile icons
Navigationtelescope.nvim (+ ui-select)Fuzzy finder
zellij-nav.nvimZellij pane navigation
Gitgitsigns.nvimGit decorations, hunk preview, blame
gitgraph.nvimGit graph visualization
Editingnvim-surroundSurround text objects
Comment.nvimSmart commenting
nvim-treesitter + textobjectsSyntax-aware highlighting & text objects
Terminaltoggleterm.nvimTerminal management, theme-aware shading
Othercord.nvimDiscord Rich Presence

Key Mappings

Leader key: Space

General

KeyModeAction
<leader>wnSave file
QnClose window
;nEnter command mode
jk / kjiExit insert mode
<leader><leader>nFind files (Telescope)
sv / ssnSplit vertically / horizontally
<leader>bnNew buffer
<leader>thnChange theme (Telescope)
<leader>nnnDismiss notifications (Noice)

LSP & Imports

KeyModeAction
KnHover documentation (rounded border)
<leader>canCode actions
<leader>fmn, vFormat file / selection
<leader>dynCopy diagnostic under cursor to clipboard
<leader>ihnToggle inlay hints
<leader>lnTrigger lint
<leader>io / <leader>ianImport symbol under cursor / import all missing
<leader>to / <leader>tsnOrganize imports / sort imports (TS)
<leader>tr / <leader>tinRemove unused / add missing imports (TS)
<leader>tfnFix all TS issues

Git

KeyModeAction
<leader>gpnPreview hunk
<leader>gbnBlame line
<leader>glnDraw git graph
KeyModeAction
<C-h/j/k/l>nNavigate Zellij panes
<C-\>n, tToggle terminal

LSP Servers

Installed automatically via Mason (chadrc.lua) and configured in configs/lspconfig.lua:

LanguageServer
Lualua_ls (with NvChad/Lazy library paths preloaded)
TypeScript/JavaScripttypescript-tools.nvim (dedicated plugin, not Mason)
HTMLhtml
CSScssls, tailwindcss
Web (JSON/CSS-in-JS)biome
Emmetemmet_ls
ESLinteslint
Bashbashls
JSONjson-lsp
Dockerdockerfile-language-server, docker-compose-language-service
Markdownmarksman

Formatting & Linting

JS/TS formatting and linting run on oxc for speed; everything else falls back to Prettier or dedicated formatters. Format-on-save is enabled via conform.nvim (configs/conform.lua), linting runs on BufEnter / BufWritePost / InsertLeave via nvim-lint (configs/lint.lua).

LanguageFormatterLinter
Luastylua—
JavaScript/TypeScript (+ JSX/TSX)oxfmt (oxc)oxlint
JSON/JSONCprettier—
HTML/CSSprettier—
Markdownprettier—
YAMLprettier—
SQLsqlfmt—
Shell (sh/bash/zsh)shfmt—

Treesitter Languages

Auto-installed: vim, lua, vimdoc, html, css, javascript, typescript, tsx, json, yaml, markdown, bash

Customization

Theme

The theme automatically syncs with macOS system appearance (lua/chadrc.lua). To pin a theme manually:

-- lua/chadrc.lua
M.base46 = {
  theme = "github_dark", -- or any NvChad theme
}

Adding LSP servers

-- lua/configs/lspconfig.lua
local servers = {
  "html",
  "cssls",
  -- add your server here
}

Adding formatters

-- lua/configs/conform.lua
formatters_by_ft = {
  python = { "black" },
  -- add your formatter here
}

License

Unlicense — public domain.