lua/config/options.lua. Options are organized by category for easy navigation.
Editor behavior
Core settings that control how Neovim behaves and responds to user input.| Option | Value | Description |
|---|---|---|
mouse | "a" | Enable mouse support in all modes |
clipboard | "unnamedplus" | Use system clipboard for yank/paste operations |
undofile | true | Save undo history between sessions |
undodir | stdpath("data")/undo | Directory where undo files are stored |
updatetime | 400 | Time in milliseconds before swap file is written (faster completion, default is 4000ms) |
timeoutlen | 1000 | Time in milliseconds to wait for a mapped sequence to complete |
confirm | true | Confirm before exiting a modified buffer |
autoread | true | Automatically reload files changed outside of Neovim |
The undo directory is automatically set to Neovim’s data directory to keep undo files organized and persistent across sessions.
UI and display
Visual settings that control how the editor appears and displays content.Color and appearance
Color and appearance
| Option | Value | Description |
|---|---|---|
termguicolors | true | Enable RGB colors (8-bit true color) |
COLORTERM env | "truecolor" | Explicitly set terminal color support |
background | "dark" | Use dark background color scheme |
cursorline | true | Highlight the line where the cursor is located |
cursorlineopt | "number" | Only highlight the line number, not the entire line |
fillchars.eob | " " | Fill empty lines at end of buffer with spaces instead of ~ |
winborder | "rounded" | Use rounded corners for floating windows |
list | false | Whitespace visualization handled by visual-whitespace.nvim plugin |
Line numbers and columns
Line numbers and columns
| Option | Value | Description |
|---|---|---|
number | true | Show absolute line numbers |
relativenumber | true | Show relative line numbers for easier motion commands |
numberwidth | 1 | Minimum width of the number column |
signcolumn | "yes:1" | Always show sign column with width of 1 to prevent layout shifts |
The sign column width is set to 1 to accommodate diagnostic signs and git status indicators without taking excessive space.
Line wrapping and text display
Line wrapping and text display
| Option | Value | Description |
|---|---|---|
wrap | false | Don’t wrap long lines |
breakindent | true | When wrapping, maintain visual indentation of original line |
showmode | false | Don’t show mode in command line (displayed in status line instead) |
showcmd | false | Don’t show pending commands in command line |
ruler | false | Don’t show cursor position (shown in status line) |
Status and command line
Status and command line
| Option | Value | Description |
|---|---|---|
showtabline | 0 | Never show the tab line |
cmdheight | 0 | Hide command line when not in use |
laststatus | 3 | Single global status line for all windows |
pumheight | 10 | Limit autocomplete menu to 10 items |
With
cmdheight set to 0, the command line overlays the status line when needed, providing more screen space for content.Search
Settings that control search behavior and highlighting.| Option | Value | Description |
|---|---|---|
hlsearch | true | Highlight all search matches |
incsearch | true | Show first search result while typing |
ignorecase | true | Ignore case in search patterns |
smartcase | true | Override ignorecase if search contains uppercase letters |
With
ignorecase and smartcase enabled together, searches are case-insensitive unless you type an uppercase letter.Indentation
Tab and indentation settings for code editing.| Option | Value | Description |
|---|---|---|
expandtab | true | Convert tabs to spaces |
shiftwidth | 4 | Number of spaces for each indentation level |
tabstop | 4 | Number of spaces a tab character displays as |
softtabstop | 4 | Number of spaces inserted/deleted when pressing Tab/Backspace |
smartindent | true | Smart autoindenting when starting a new line |
smarttab | true | Insert blanks according to shiftwidth at line start |
autoindent | true | Copy indent from current line when starting new line |
Splits
Window split behavior settings.| Option | Value | Description |
|---|---|---|
splitbelow | true | Horizontal splits open below current window |
splitright | true | Vertical splits open to the right of current window |
Files
File handling and backup settings.| Option | Value | Description |
|---|---|---|
fileencoding | "utf-8" | Default file encoding |
backup | false | Don’t create backup files |
writebackup | false | Don’t create backup before overwriting file |
swapfile | false | Don’t use swap files |
Completion
Autocompletion and text concealing options.| Option | Value | Description |
|---|---|---|
conceallevel | 0 | Show all text, don’t hide markdown syntax or quotes |
completeopt | {"menu", "menuone", "noselect"} | Standard autocomplete menu behavior |
Code folding
Treesitter-based code folding configuration.| Option | Value | Description |
|---|---|---|
foldenable | true | Enable code folding |
foldcolumn | "1" | Show fold column with width of 1 |
foldexpr | "v:lua.vim.treesitter.foldexpr()" | Use Treesitter for fold expressions |
foldlevel | 99 | Folds with higher level will be closed |
foldlevelstart | 99 | Start with all folds open |
foldmethod | "expr" | Use expression for folding |
Folding is powered by Treesitter, which provides accurate syntax-aware folds. All folds start open by default (foldlevel=99).
Other options
Miscellaneous settings that don’t fit other categories.| Option | Value | Description |
|---|---|---|
title | true | Set the terminal window title |
scrolloff | 5 | Minimum number of lines to keep above/below cursor for context |
virtualedit | "block" | In visual block mode, allow cursor to move anywhere |
inccommand | "split" | Show preview of substitution commands in split window |
The
inccommand option provides live preview when using commands like :%s/foo/bar/g, showing changes in a split window before you commit them.Filetype detection
Custom filetype associations for special file patterns.Extension mappings
Extension mappings
| Extension | Filetype |
|---|---|
.env | dotenv |
.mdx | mdx |
Filename mappings
Filename mappings
| Filename | Filetype |
|---|---|
.env | dotenv |
env | dotenv |
Pattern mappings
Pattern mappings
| Pattern | Filetype |
|---|---|
[jt]sconfig.*.json | jsonc (JSON with comments) |
.env.[anything] | dotenv |
Related configuration
Diagnostic signs are configured separately in
plugins/lsp/init.lua via vim.diagnostic.config().