nix-config/home/features/coding/nixvim/options.nix
2024-12-02 20:15:01 +01:00

52 lines
1.2 KiB
Nix

{
programs.nixvim = {
config = {
# System clipboard support, needs xclip/wl-clipboard
clipboard = {
providers = {
wl-copy.enable = true; # Wayland
xsel.enable = true; # For X11
};
register = "unnamedplus";
};
globals.mapleader = " ";
opts = {
number = true; # Show line numbers
relativenumber = true; # Show relative line numbers
shiftwidth = 2; # Tab width should be 2
# Always show the signcolumn, otherwise text would be shifted when displaying error icons
signcolumn = "yes";
# Enable mouse
mouse = "a";
# Search
ignorecase = true;
smartcase = true;
# Save undo history
undofile = true;
# Global substitution by default
gdefault = true;
# Start scrolling when the cursor is X lines away from the top/bottom
scrolloff = 8;
# Enable 24-bit RGB color in the TUI
termguicolors = true;
# Wrap long lines at a character in 'breakat'
linebreak = true;
smartindent = true;
# Remove EOB
fillchars = {
eob = " ";
};
};
};
};
}