My collection of sensible Neovim default settings.
All options are organized into sections with comments for clarity.
- Mouse support enabled (
mouse = 'a') - Swap files disabled
- Scroll margins: 5 lines vertical, 15 lines horizontal
- Split windows below and to the right
- Completion menu configuration (always show, no auto-select)
- Long lines not wrapped (
wrap = false), wrapping at word boundaries when enabled - Max text width of 120 characters
- Spaces for indentation (2 spaces)
- Visible whitespace characters (tabs, trailing spaces, line endings)
- Cursor line highlighting
- Line numbers displayed, relative to the cursor
- True colors enabled (
termguicolors) - Status line always visible
- Smart case search (case-insensitive unless uppercase letters are used)
- System clipboard integration (
clipboard = 'unnamedplus') - Minimal diagnostics UI (gutter signs + underlines, no inline text)
- Automatic trailing whitespace trimming on save
- Terminal buffers entered in insert mode
/- Enable search highlighting when searching<leader><cr>- Clear search highlighting<S-Tab>(Insert mode) - Tab backwardsj/k- Move by display lines (works with wrapped text)va- Select all text</>(Visual mode) - Indent and keep selectionD- Delete to end of line (consistent withC)Y- Yank to end of line (consistent withDandC)
:BufOnly/:bo- Close all buffers except the current one:PackUpdate [name...]- Update all plugins installed withvim.pack, or only the named ones (tab-completes plugin names):PackOrphans- List plugins still on disk after their source was removed from the config:PackClean- Delete those orphans, after confirming
The :Pack* commands are only defined on Neovim 0.12+, where vim.pack exists.
The module returns helpers for you to bind yourself:
require('rational').copy_path(absolute, ranged)- Copy the current buffer's path to the clipboard.absolutepicks%:pover%;rangedappends the selected line range (e.g.init.lua:10-20) and is meant for a visual-mode mapping:
vim.keymap.set('x', '<leader>p', function() require('rational').copy_path(false, true) end)You can customize the plugin behavior by setting global variables in your init.lua:
vim.g.rational_diagnostic_signs(boolean, default:true) - Enable custom LSP diagnostic signs (requires nerd font icons)
Using vim-plug:
Plug 'lcmen/rational.nvim'