2024-05-27 00:58:58 +02:00
|
|
|
|
# Neovim options
|
|
|
|
|
|
# Use :options to get the list of all options
|
|
|
|
|
|
# Use :h <option> to load help for given <option>
|
|
|
|
|
|
{
|
2024-05-27 09:39:25 +02:00
|
|
|
|
opts = {
|
2024-06-03 23:44:02 +02:00
|
|
|
|
# Keep visual indentation on wrapped lines
|
|
|
|
|
|
breakindent = true;
|
|
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Hide command line unless needed
|
|
|
|
|
|
cmdheight = 0;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Insert mode completion options
|
|
|
|
|
|
completeopt = [ "menu" "menuone" "noselect" ];
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Copy previous indentation on autoindenting
|
|
|
|
|
|
copyindent = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Highlight current line
|
|
|
|
|
|
cursorline = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Expand <Tab> to spaces
|
|
|
|
|
|
expandtab = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Enable fold with all code unfolded
|
|
|
|
|
|
foldcolumn = "1";
|
|
|
|
|
|
foldenable = true;
|
|
|
|
|
|
foldlevel = 99;
|
|
|
|
|
|
foldlevelstart = 99;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Ignore case in search patterns
|
|
|
|
|
|
ignorecase = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Show substitution preview in split window
|
|
|
|
|
|
inccommand = "split";
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Infer casing on word completion
|
|
|
|
|
|
infercase = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Enable list mode
|
|
|
|
|
|
list = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Set custom strings for list mode
|
|
|
|
|
|
# - tabulations are shown as ‒▶
|
|
|
|
|
|
# - trailing spaces are shown as ·
|
|
|
|
|
|
# - multiple non-leading consecutive spaces are shown as bullets (·)
|
|
|
|
|
|
# - non-breakable spaces are shown as ⎕
|
|
|
|
|
|
listchars = "tab:‒▶,trail:·,multispace:·,lead: ,nbsp:⎕";
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Show line numbers
|
|
|
|
|
|
number = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Preserve indentation as much as possible
|
|
|
|
|
|
preserveindent = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Height of the popup menu
|
|
|
|
|
|
pumheight = 10;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Display line numbers relative to current line
|
|
|
|
|
|
relativenumber = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Minimal number of lines to keep around the cursor
|
|
|
|
|
|
# This has the effect to move the view along with current line
|
|
|
|
|
|
#scrolloff = 999;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Number of spaces to use for indentation
|
|
|
|
|
|
shiftwidth = 2;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Always show tabline (TODO: use with heirline?)
|
|
|
|
|
|
#showtabline = 2;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Show signs instead of number in gutter
|
2024-06-03 23:43:31 +02:00
|
|
|
|
signcolumn = "yes";
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Override ignorecase if search pattern contains uppercase characters
|
|
|
|
|
|
smartcase = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Number of spaces input on <Tab>
|
|
|
|
|
|
softtabstop = 2;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Open horizontal split below (:split)
|
|
|
|
|
|
splitbelow = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Open vertical split to the right (:vsplit)
|
|
|
|
|
|
splitright = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Number of spaces to represent a <Tab>
|
|
|
|
|
|
tabstop = 2;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Enables 24-bit RGB color
|
|
|
|
|
|
termguicolors = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Shorter timeout duration
|
|
|
|
|
|
timeoutlen = 500;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Set window title to the filename
|
|
|
|
|
|
title = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Save undo history to undo file (in $XDG_STATE_HOME/nvim/undo)
|
|
|
|
|
|
undofile = true;
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Enable virtual edit in visual block mode
|
|
|
|
|
|
# This has the effect of selecting empty cells beyond lines boundaries
|
|
|
|
|
|
virtualedit = "block";
|
2024-05-27 00:58:58 +02:00
|
|
|
|
|
2024-05-27 09:39:25 +02:00
|
|
|
|
# Disable line wrapping
|
|
|
|
|
|
wrap = false;
|
|
|
|
|
|
};
|
2024-05-27 00:58:58 +02:00
|
|
|
|
}
|