96 lines
2.4 KiB
Nix
96 lines
2.4 KiB
Nix
{
|
|
pkgs,
|
|
inputs,
|
|
nixvim,
|
|
...
|
|
}: {
|
|
imports = [
|
|
./opts.nix
|
|
./keymaps.nix
|
|
./plugins
|
|
];
|
|
programs.nixvim = {
|
|
enable = true;
|
|
|
|
globals = {
|
|
#Set leader to space, and localleader to \
|
|
mapleader = " ";
|
|
maplocalleader = "\\";
|
|
|
|
have_nerd_font = true;
|
|
};
|
|
|
|
clipboard = {
|
|
providers = {
|
|
wl-copy.enable = true; # For Wayland
|
|
xsel.enable = true; # For X11
|
|
};
|
|
|
|
# Sync clipboard between OS and Neovim
|
|
# Remove this option if you want your OS clipboard to remain independent.
|
|
register = "unnamedplus";
|
|
};
|
|
|
|
opts = {
|
|
# Show line numbers
|
|
number = true;
|
|
# You can also add relative line numbers, to help with jumping.
|
|
# Experiment for yourself to see if you like it!
|
|
#relativenumber = true
|
|
|
|
# Enable mouse mode, can be useful for resizing splits for example!
|
|
mouse = "a";
|
|
|
|
# Don't show the mode, since it's already in the statusline
|
|
showmode = false;
|
|
|
|
# Enable break indent
|
|
breakindent = true;
|
|
|
|
# Save undo history
|
|
undofile = true;
|
|
|
|
# Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
|
ignorecase = true;
|
|
smartcase = true;
|
|
|
|
# Keep signcolumn on by default
|
|
signcolumn = "yes";
|
|
|
|
# Decrease update time
|
|
updatetime = 250;
|
|
|
|
# Decrease mapped sequence wait time
|
|
# Displays which-key popup sooner
|
|
timeoutlen = 300;
|
|
|
|
# Configure how new splits should be opened
|
|
splitright = true;
|
|
splitbelow = true;
|
|
|
|
# Sets how neovim will display certain whitespace characters in the editor
|
|
# See `:help 'list'`
|
|
# and `:help 'listchars'`
|
|
list = true;
|
|
# NOTE: .__raw here means that this field is raw lua code
|
|
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
|
|
|
# Preview substitutions live, as you type!
|
|
inccommand = "split";
|
|
|
|
# Show which line your cursor is on
|
|
cursorline = true;
|
|
|
|
# Minimal number of screen lines to keep above and below the cursor.
|
|
scrolloff = 10;
|
|
|
|
# if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
|
# instead raise a dialog asking if you wish to save the current file(s)
|
|
# See `:help 'confirm'`
|
|
confirm = true;
|
|
|
|
# See `:help hlsearch`
|
|
hlsearch = true;
|
|
};
|
|
};
|
|
}
|