Skip to main content
Magictt comes with a carefully curated set of Vim options that provide a modern, productive editing experience. All options are configured in lua/magictt/core/options.lua.

Line Numbers

Magictt uses hybrid line numbers for efficient navigation:
opt.relativenumber = true -- show relative line numbers
opt.number = true -- shows absolute line number on cursor line
Why this configuration?
  • Relative line numbers make jumping with motion commands (like 5j or 10k) more intuitive
  • The absolute number on the cursor line helps you know exactly where you are in the file

Tabs & Indentation

opt.tabstop = 4 -- 4 spaces for tabs (prettier default)
opt.shiftwidth = 4 -- 4 spaces for indent width
opt.expandtab = true -- expand tab to spaces
opt.autoindent = true -- copy indent from current line when starting new one
Configuration details:
  • Tab size: 4 spaces (aligns with Prettier defaults)
  • Expand tabs: Tabs are converted to spaces for consistency across editors
  • Auto-indent: New lines automatically inherit the indentation of the previous line

Line Wrapping

opt.wrap = true -- enable line wrapping
Lines wrap at the window edge, making it easier to view long lines without horizontal scrolling.

Search Settings

opt.ignorecase = true -- ignore case when searching
opt.smartcase = true -- if you include mixed case in your search, assumes you want case-sensitive
Smart case-insensitive search:
  • Searching for /hello matches “hello”, “Hello”, and “HELLO”
  • Searching for /Hello only matches “Hello” (case-sensitive)

Cursor Line

opt.cursorline = true -- highlight the current cursor line
Highlights the line where your cursor is located, making it easier to track your position.

Appearance

opt.termguicolors = true
opt.background = "dark" -- colorschemes that can be light or dark will be made dark
opt.signcolumn = "yes" -- show sign column so that text doesn't shift
Visual configuration:
  • True colors: Enables 24-bit RGB colors (requires a modern terminal)
  • Dark background: Sets colorschemes to use dark variants
  • Sign column: Always shows the sign column (for git signs, diagnostics, etc.) to prevent text shifting

Clipboard

opt.clipboard:append("unnamedplus") -- use system clipboard as default register
Yank and paste operations automatically use the system clipboard, making it easy to copy/paste between Neovim and other applications.

Editing Behavior

opt.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position
Configures backspace to work intuitively in all situations.

Split Windows

opt.splitright = true -- split vertical window to the right
opt.splitbelow = true -- split horizontal window to the bottom
Natural split behavior:
  • Vertical splits open to the right of the current window
  • Horizontal splits open below the current window

File Management

opt.swapfile = false -- turn off swapfile
Disables swap files for a cleaner working directory. Modern version control and auto-save features make swap files less necessary.

File Explorer

vim.cmd("let g:netrw_liststyle = 3")
Sets netrw (Vim’s built-in file explorer) to tree-style listing.

LSP Diagnostics Configuration

Magictt configures how LSP diagnostics (errors, warnings, hints) are displayed:
vim.diagnostic.config({
  virtual_text = {
    prefix = "●", -- customize the prefix for virtual text
    spacing = 4,
  },
  signs = true,
  underline = true,
  update_in_insert = false,
  severity_sort = true,
})
Diagnostic display features:
  • Virtual text: Shows diagnostic messages inline with a bullet prefix and 4-space spacing
  • Signs: Displays icons in the sign column for each diagnostic
  • Underline: Underlines problematic code
  • Insert mode: Diagnostics don’t update while typing (reduces distraction)
  • Severity sort: Sorts diagnostics by severity (errors first)
Diagnostic signs (icons) are configured separately in lua/magictt/lsp.lua. See LSP Setup for more details.

Keymaps

View all keyboard shortcuts and bindings

LSP Setup

Learn about language server configuration

Build docs developers (and LLMs) love